summaryrefslogtreecommitdiff
path: root/src/plugins/subversion/subversionplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/subversion/subversionplugin.cpp')
-rw-r--r--src/plugins/subversion/subversionplugin.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp
index fd335e4668..2abc041d12 100644
--- a/src/plugins/subversion/subversionplugin.cpp
+++ b/src/plugins/subversion/subversionplugin.cpp
@@ -568,7 +568,7 @@ void SubversionPlugin::revertCurrentFile()
QStringList args(QLatin1String("diff"));
args << SubversionClient::addAuthenticationOptions(client()->settings());
- args.push_back(state.relativeCurrentFile());
+ args.push_back(SubversionClient::escapeFile(state.relativeCurrentFile()));
const SubversionResponse diffResponse
= runSvn(state.currentFileTopLevel(), args, m_client->vcsTimeoutS(), 0);
@@ -589,7 +589,7 @@ void SubversionPlugin::revertCurrentFile()
args.clear();
args << QLatin1String("revert");
args << SubversionClient::addAuthenticationOptions(client()->settings());
- args << state.relativeCurrentFile();
+ args << SubversionClient::escapeFile(state.relativeCurrentFile());
const SubversionResponse revertResponse
= runSvn(state.currentFileTopLevel(), args, m_client->vcsTimeoutS(),
@@ -652,7 +652,7 @@ void SubversionPlugin::startCommit(const QString &workingDir, const QStringList
QStringList args(QLatin1String("status"));
args << SubversionClient::addAuthenticationOptions(client()->settings());
- args += files;
+ args += SubversionClient::escapeFiles(files);
const SubversionResponse response
= runSvn(workingDir, args, m_client->vcsTimeoutS(), 0);
@@ -733,7 +733,7 @@ void SubversionPlugin::svnStatus(const QString &workingDir, const QString &relat
QStringList args(QLatin1String("status"));
args << SubversionClient::addAuthenticationOptions(client()->settings());
if (!relativePath.isEmpty())
- args.append(relativePath);
+ args.append(SubversionClient::escapeFile(relativePath));
VcsOutputWindow::setRepository(workingDir);
runSvn(workingDir, args, m_client->vcsTimeoutS(),
VcsCommand::ShowStdOut | VcsCommand::ShowSuccessMessage);
@@ -798,7 +798,7 @@ void SubversionPlugin::vcsAnnotate(const QString &workingDir, const QString &fil
if (!revision.isEmpty())
args << QLatin1String("-r") << revision;
args.push_back(QLatin1String("-v"));
- args.append(QDir::toNativeSeparators(file));
+ args.append(QDir::toNativeSeparators(SubversionClient::escapeFile(file)));
const SubversionResponse response
= runSvn(workingDir, args, m_client->vcsTimeoutS(),
@@ -958,7 +958,7 @@ QString SubversionPlugin::synchronousTopic(const QString &repository) const
bool SubversionPlugin::vcsAdd(const QString &workingDir, const QString &rawFileName)
{
- const QString file = QDir::toNativeSeparators(rawFileName);
+ const QString file = QDir::toNativeSeparators(SubversionClient::escapeFile(rawFileName));
QStringList args;
args << QLatin1String("add")
<< SubversionClient::addAuthenticationOptions(client()->settings())
@@ -971,7 +971,7 @@ bool SubversionPlugin::vcsAdd(const QString &workingDir, const QString &rawFileN
bool SubversionPlugin::vcsDelete(const QString &workingDir, const QString &rawFileName)
{
- const QString file = QDir::toNativeSeparators(rawFileName);
+ const QString file = QDir::toNativeSeparators(SubversionClient::escapeFile(rawFileName));
QStringList args;
args << QLatin1String("delete");
@@ -988,7 +988,8 @@ bool SubversionPlugin::vcsMove(const QString &workingDir, const QString &from, c
{
QStringList args(QLatin1String("move"));
args << SubversionClient::addAuthenticationOptions(client()->settings());
- args << QDir::toNativeSeparators(from) << QDir::toNativeSeparators(to);
+ args << QDir::toNativeSeparators(SubversionClient::escapeFile(from))
+ << QDir::toNativeSeparators(SubversionClient::escapeFile(to));
const SubversionResponse response
= runSvn(workingDir, args, m_client->vcsTimeoutS(),
VcsCommand::SshPasswordPrompt | VcsCommand::ShowStdOut
@@ -1051,7 +1052,8 @@ bool SubversionPlugin::managesFile(const QString &workingDirectory, const QStrin
{
QStringList args;
args << QLatin1String("status");
- args << SubversionClient::addAuthenticationOptions(client()->settings()) << fileName;
+ args << SubversionClient::addAuthenticationOptions(client()->settings())
+ << QDir::toNativeSeparators(SubversionClient::escapeFile(fileName));
SubversionResponse response
= runSvn(workingDirectory, args, m_client->vcsTimeoutS(), 0);
return response.stdOut.isEmpty() || response.stdOut.at(0) != QLatin1Char('?');