summaryrefslogtreecommitdiff
path: root/src/plugins/subversion
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-04-10 14:44:17 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-04-13 10:47:08 +0000
commit7719fb669cc522e2b1846b05e22fb1d0a6317963 (patch)
treecf1edd663f9b65dc21eb523573be9ce7a0a26a39 /src/plugins/subversion
parenta55fb4a378644ab641f0663c8f2577f48a905491 (diff)
downloadqt-creator-7719fb669cc522e2b1846b05e22fb1d0a6317963.tar.gz
Vcs: Standardize on second based timeouts
Change-Id: Ia273fda05a4c4a1934819f26e5dc1b6b80a89f6f Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/subversion')
-rw-r--r--src/plugins/subversion/subversionclient.cpp4
-rw-r--r--src/plugins/subversion/subversionplugin.cpp34
-rw-r--r--src/plugins/subversion/subversionplugin.h2
3 files changed, 20 insertions, 20 deletions
diff --git a/src/plugins/subversion/subversionclient.cpp b/src/plugins/subversion/subversionclient.cpp
index db1b2be053..fa284ec7ee 100644
--- a/src/plugins/subversion/subversionclient.cpp
+++ b/src/plugins/subversion/subversionclient.cpp
@@ -222,7 +222,7 @@ QString DiffController::getDescription() const
args << QString::number(m_changeNumber);
const SubversionResponse logResponse =
SubversionPlugin::instance()->runSvn(m_workingDirectory, args,
- m_client->vcsTimeout() * 1000,
+ m_client->vcsTimeoutS(),
VcsBasePlugin::SshPasswordPrompt);
if (logResponse.error)
@@ -252,7 +252,7 @@ void DiffController::postCollectTextualDiffOutput()
args << m_filesList;
}
- command->addJob(args, m_client->vcsTimeout());
+ command->addJob(args, m_client->vcsTimeoutS());
command->execute();
}
diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp
index 51480d5f28..a685124210 100644
--- a/src/plugins/subversion/subversionplugin.cpp
+++ b/src/plugins/subversion/subversionplugin.cpp
@@ -585,7 +585,7 @@ void SubversionPlugin::revertAll()
args << SubversionClient::addAuthenticationOptions(client()->settings());
args << QLatin1String("--recursive") << state.topLevel();
const SubversionResponse revertResponse
- = runSvn(state.topLevel(), args, m_client->vcsTimeout() * 1000,
+ = runSvn(state.topLevel(), args, m_client->vcsTimeoutS(),
SshPasswordPrompt|ShowStdOutInLogWindow);
if (revertResponse.error)
QMessageBox::warning(ICore::dialogParent(), title,
@@ -604,7 +604,7 @@ void SubversionPlugin::revertCurrentFile()
args.push_back(state.relativeCurrentFile());
const SubversionResponse diffResponse
- = runSvn(state.currentFileTopLevel(), args, m_client->vcsTimeout() * 1000, 0);
+ = runSvn(state.currentFileTopLevel(), args, m_client->vcsTimeoutS(), 0);
if (diffResponse.error)
return;
@@ -625,7 +625,7 @@ void SubversionPlugin::revertCurrentFile()
args << state.relativeCurrentFile();
const SubversionResponse revertResponse
- = runSvn(state.currentFileTopLevel(), args, m_client->vcsTimeout() * 1000,
+ = runSvn(state.currentFileTopLevel(), args, m_client->vcsTimeoutS(),
SshPasswordPrompt|ShowStdOutInLogWindow);
if (!revertResponse.error)
@@ -688,7 +688,7 @@ void SubversionPlugin::startCommit(const QString &workingDir, const QStringList
args += files;
const SubversionResponse response
- = runSvn(workingDir, args, m_client->vcsTimeout() * 1000, 0);
+ = runSvn(workingDir, args, m_client->vcsTimeoutS(), 0);
if (response.error)
return;
@@ -768,8 +768,7 @@ void SubversionPlugin::svnStatus(const QString &workingDir, const QString &relat
if (!relativePath.isEmpty())
args.append(relativePath);
VcsOutputWindow::setRepository(workingDir);
- runSvn(workingDir, args, m_client->vcsTimeout() * 1000,
- ShowStdOutInLogWindow|ShowSuccessMessage);
+ runSvn(workingDir, args, m_client->vcsTimeoutS(), ShowStdOutInLogWindow|ShowSuccessMessage);
VcsOutputWindow::clearRepository();
}
@@ -795,7 +794,7 @@ void SubversionPlugin::svnUpdate(const QString &workingDir, const QString &relat
if (!relativePath.isEmpty())
args.append(relativePath);
const SubversionResponse response
- = runSvn(workingDir, args, 10 * m_client->vcsTimeout() * 1000,
+ = runSvn(workingDir, args, 10 * m_client->vcsTimeoutS(),
SshPasswordPrompt|ShowStdOutInLogWindow);
if (!response.error)
subVersionControl()->emitRepositoryChanged(workingDir);
@@ -834,7 +833,7 @@ void SubversionPlugin::vcsAnnotate(const QString &workingDir, const QString &fil
args.append(QDir::toNativeSeparators(file));
const SubversionResponse response
- = runSvn(workingDir, args, m_client->vcsTimeout() * 1000,
+ = runSvn(workingDir, args, m_client->vcsTimeoutS(),
SshPasswordPrompt|ForceCLocale, codec);
if (response.error)
return;
@@ -915,8 +914,9 @@ void SubversionPlugin::submitCurrentLog()
}
SubversionResponse SubversionPlugin::runSvn(const QString &workingDir,
- const QStringList &arguments, int timeOut,
- unsigned flags, QTextCodec *outputCodec) const
+ const QStringList &arguments,
+ int timeOutS, unsigned flags,
+ QTextCodec *outputCodec) const
{
const FileName executable = client()->vcsBinary();
SubversionResponse response;
@@ -927,12 +927,12 @@ SubversionResponse SubversionPlugin::runSvn(const QString &workingDir,
}
const SynchronousProcessResponse sp_resp =
- VcsBasePlugin::runVcs(workingDir, executable, arguments, timeOut,
+ VcsBasePlugin::runVcs(workingDir, executable, arguments, timeOutS,
flags, outputCodec);
response.error = sp_resp.result != SynchronousProcessResponse::Finished;
if (response.error)
- response.message = sp_resp.exitMessage(executable.toString(), timeOut);
+ response.message = sp_resp.exitMessage(executable.toString(), timeOutS * 1000);
response.stdErr = sp_resp.stdErr;
response.stdOut = sp_resp.stdOut;
return response;
@@ -998,7 +998,7 @@ bool SubversionPlugin::vcsAdd(const QString &workingDir, const QString &rawFileN
<< SubversionClient::addAuthenticationOptions(client()->settings())
<< QLatin1String("--parents") << file;
const SubversionResponse response
- = runSvn(workingDir, args, m_client->vcsTimeout() * 1000,
+ = runSvn(workingDir, args, m_client->vcsTimeoutS(),
SshPasswordPrompt|ShowStdOutInLogWindow);
return !response.error;
}
@@ -1013,7 +1013,7 @@ bool SubversionPlugin::vcsDelete(const QString &workingDir, const QString &rawFi
<< QLatin1String("--force") << file;
const SubversionResponse response
- = runSvn(workingDir, args, m_client->vcsTimeout() * 1000,
+ = runSvn(workingDir, args, m_client->vcsTimeoutS(),
SshPasswordPrompt|ShowStdOutInLogWindow);
return !response.error;
}
@@ -1024,7 +1024,7 @@ bool SubversionPlugin::vcsMove(const QString &workingDir, const QString &from, c
args << SubversionClient::addAuthenticationOptions(client()->settings());
args << QDir::toNativeSeparators(from) << QDir::toNativeSeparators(to);
const SubversionResponse response
- = runSvn(workingDir, args, m_client->vcsTimeout() * 1000,
+ = runSvn(workingDir, args, m_client->vcsTimeoutS(),
SshPasswordPrompt|ShowStdOutInLogWindow|FullySynchronously);
return !response.error;
}
@@ -1052,7 +1052,7 @@ bool SubversionPlugin::vcsCheckout(const QString &directory, const QByteArray &u
args << QLatin1String(tempUrl.toEncoded()) << directory;
const SubversionResponse response
- = runSvn(directory, args, 10 * m_client->vcsTimeout() * 1000,
+ = runSvn(directory, args, 10 * m_client->vcsTimeoutS(),
VcsBasePlugin::SshPasswordPrompt);
return !response.error;
@@ -1087,7 +1087,7 @@ bool SubversionPlugin::managesFile(const QString &workingDirectory, const QStrin
args << QLatin1String("status");
args << SubversionClient::addAuthenticationOptions(client()->settings()) << fileName;
SubversionResponse response
- = runSvn(workingDirectory, args, m_client->vcsTimeout() * 1000, 0);
+ = runSvn(workingDirectory, args, m_client->vcsTimeoutS(), 0);
return response.stdOut.isEmpty() || response.stdOut.at(0) != QLatin1Char('?');
}
diff --git a/src/plugins/subversion/subversionplugin.h b/src/plugins/subversion/subversionplugin.h
index 4ce214c923..dcc16c3f71 100644
--- a/src/plugins/subversion/subversionplugin.h
+++ b/src/plugins/subversion/subversionplugin.h
@@ -92,7 +92,7 @@ public:
QString monitorFile(const QString &repository) const;
QString synchronousTopic(const QString &repository) const;
SubversionResponse runSvn(const QString &workingDir,
- const QStringList &arguments, int timeOut,
+ const QStringList &arguments, int timeOutS,
unsigned flags, QTextCodec *outputCodec = 0) const;
public slots: