forked from qt-creator/qt-creator
VCS[Mercurial]: Remove LANG=C setting
as it breaks the log output.
Task-number: QTCREATORBUG-1623
(cherry picked from commit b8c78764e2
)
This commit is contained in:
@@ -121,8 +121,6 @@ bool MercurialClient::executeHgSynchronously(const QString &workingDir,
|
||||
QProcess hgProcess;
|
||||
if (!workingDir.isEmpty())
|
||||
hgProcess.setWorkingDirectory(workingDir);
|
||||
MercurialJobRunner::setProcessEnvironment(hgProcess);
|
||||
|
||||
const MercurialSettings &settings = MercurialPlugin::instance()->settings();
|
||||
const QString binary = settings.binary();
|
||||
const QStringList arguments = settings.standardArguments() + args;
|
||||
|
@@ -162,16 +162,6 @@ QString MercurialJobRunner::msgTimeout(int timeoutSeconds)
|
||||
return tr("Timed out after %1s waiting for mercurial process to finish.").arg(timeoutSeconds);
|
||||
}
|
||||
|
||||
// Set environment for a hg process to run in locale "C". Note that there appears
|
||||
// to be a bug in hg that causes special characters to be garbled when running
|
||||
// in a different language, which seems to be independent from the encoding.
|
||||
void MercurialJobRunner::setProcessEnvironment(QProcess &p)
|
||||
{
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert(QLatin1String("LANG"), QString(QLatin1Char('C')));
|
||||
p.setProcessEnvironment(env);
|
||||
}
|
||||
|
||||
void MercurialJobRunner::task(const QSharedPointer<HgTask> &job)
|
||||
{
|
||||
HgTask *taskData = job.data();
|
||||
@@ -203,9 +193,6 @@ void MercurialJobRunner::task(const QSharedPointer<HgTask> &job)
|
||||
qDebug() << Q_FUNC_INFO << "Repository root is " << taskData->repositoryRoot();
|
||||
|
||||
QProcess hgProcess;
|
||||
hgProcess.setWorkingDirectory(taskData->repositoryRoot());
|
||||
MercurialJobRunner::setProcessEnvironment(hgProcess);
|
||||
|
||||
hgProcess.start(binary, args);
|
||||
|
||||
if (!hgProcess.waitForStarted()) {
|
||||
|
@@ -99,9 +99,6 @@ public:
|
||||
static QString msgStartFailed(const QString &binary, const QString &why);
|
||||
static QString msgTimeout(int timeoutSeconds);
|
||||
|
||||
// Set environment for a hg process to run in locale "C"
|
||||
static void setProcessEnvironment(QProcess &p);
|
||||
|
||||
protected:
|
||||
void run();
|
||||
|
||||
|
Reference in New Issue
Block a user