Skip to content
Snippets Groups Projects
Commit f9959041 authored by Roman Kovalev's avatar Roman Kovalev Committed by Oswald Buddenhagen
Browse files

svn: annotate codec - bugfix


getCodec() needs to be called with an absolute file name.

As the changed decoding of the file contents will break the decoding of
svn's annotation prefixes (which are in system locale), force LC_ALL=C
to prevent an encoding mix in the first place.

Merge-request: 214
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
parent 6e1c4c8e
No related branches found
No related tags found
No related merge requests found
......@@ -913,7 +913,8 @@ void SubversionPlugin::vcsAnnotate(const QString &workingDir, const QString &fil
const QString &revision /* = QString() */,
int lineNumber /* = -1 */)
{
QTextCodec *codec = VCSBase::VCSBaseEditor::getCodec(file);
const QString source = VCSBase::VCSBaseEditor::getSource(workingDir, file);
QTextCodec *codec = VCSBase::VCSBaseEditor::getCodec(source);
QStringList args(QLatin1String("annotate"));
if (m_settings.spaceIgnorantAnnotation)
......@@ -925,13 +926,12 @@ void SubversionPlugin::vcsAnnotate(const QString &workingDir, const QString &fil
const SubversionResponse response =
runSvn(workingDir, args, m_settings.timeOutMS(),
SshPasswordPrompt, codec);
SshPasswordPrompt|ForceCLocale, codec);
if (response.error)
return;
// Re-use an existing view if possible to support
// the common usage pattern of continuously changing and diffing a file
const QString source = workingDir + QLatin1Char('/') + file;
if (lineNumber <= 0)
lineNumber = VCSBase::VCSBaseEditor::lineNumberOfCurrentEditor(source);
// Determine id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment