Commit ca6f37f3 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

SVN: Fix topic

Use svnversion in favor of svn info to report the topic for SVN versions.

Task-number: QTCREATORBUG-13611
Change-Id: Ia1f61c0d3b9bfb871d42449478029835c7b2796f
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <>
parent e07b495b
......@@ -39,6 +39,8 @@
#include <diffeditor/diffutils.h>
#include <coreplugin/editormanager/editormanager.h>
#include <utils/hostosinfo.h>
#include <QDir>
#include <QFileInfo>
#include <QTextStream>
......@@ -136,19 +138,20 @@ QStringList SubversionClient::addAuthenticationOptions(const VcsBaseClientSettin
QString SubversionClient::synchronousTopic(const QString &repository)
QStringList args;
args << QLatin1String("info");
const SynchronousProcessResponse result = vcsFullySynchronousExec(repository, args);
QString svnVersionBinary = vcsBinary().toString();
int pos = svnVersionBinary.lastIndexOf('/');
if (pos < 0)
svnVersionBinary = svnVersionBinary.left(pos + 1);
const SynchronousProcessResponse result
= vcsFullySynchronousExec(repository, FileName::fromString(svnVersionBinary), args);
if (result.result != SynchronousProcessResponse::Finished)
return QString();
const QString revisionString = QLatin1String("Revision: ");
// stdOut is ASCII only (at least in those areas we care about).
foreach (const QString &line, result.stdOut().split(QLatin1Char('\n'))) {
if (line.startsWith(revisionString))
return QString::fromLatin1("r") + line.mid(revisionString.count());
return QString();
return result.stdOut().trimmed();
class DiffController : public DiffEditorController
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment