Commit 6383643d authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

VCS[Subversion/Perforce]: Fix VCSManager caching (Windows).

Ensure clean paths are returned by
IVersionControl::findTopLevelForDirectory() as otherwise caching
of VCSManager breaks (Windows) and commands are executed all over
again. Fix display in SVN/CVS.

Acked-by: con
parent 4ed4535a
......@@ -980,7 +980,8 @@ static inline QString msgExecutionLogEntry(const QString &workingDir, const QStr
const QString args = arguments.join(QString(QLatin1Char(' ')));
if (workingDir.isEmpty())
return CVSPlugin::tr("Executing: %1 %2\n").arg(executable, args);
return CVSPlugin::tr("Executing in %1: %2 %3\n").arg(workingDir, executable, args);
return CVSPlugin::tr("Executing in %1: %2 %3\n").
arg(QDir::toNativeSeparators(workingDir), executable, args);
// Run CVS. At this point, file arguments must be relative to
......@@ -155,8 +155,9 @@ static inline QString clientRootFromOutput(const QString &in)
QRegExp regExp(QLatin1String("(\\n|\\r\\n|\\r)Root:\\s*(.*)(\\n|\\r\\n|\\r)"));
QTC_ASSERT(regExp.isValid(), return QString());
// Normalize slashes and capitalization of Windows drive letters for caching.
if (regExp.indexIn(in) != -1)
return regExp.cap(2).trimmed();
return QFileInfo(regExp.cap(2).trimmed()).absoluteFilePath();
return QString();
......@@ -1030,7 +1030,8 @@ static inline QString msgExecutionLogEntry(const QString &workingDir, const QStr
const QString argsS = SubversionSettings::formatArguments(arguments);
if (workingDir.isEmpty())
return SubversionPlugin::tr("Executing: %1 %2\n").arg(executable, argsS);
return SubversionPlugin::tr("Executing in %1: %2 %3\n").arg(workingDir, executable, argsS);
return SubversionPlugin::tr("Executing in %1: %2 %3\n").
arg(QDir::toNativeSeparators(workingDir), executable, argsS);
SubversionResponse SubversionPlugin::runSvn(const QString &workingDir,
......@@ -1252,7 +1253,7 @@ QString SubversionPlugin::findTopLevelForDirectoryI(const QString &directory) co
return QString();
for (QDir parentDir = lastDirectory; parentDir.cdUp() ; lastDirectory = parentDir) {
if (!managesDirectory(parentDir))
return QDir::toNativeSeparators(lastDirectory.absolutePath());
return lastDirectory.absolutePath();
return QString();
Supports Markdown
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