forked from qt-creator/qt-creator
VCS[hg]: Mercurial forgets working directory from commit #2 on.
Do not clear variable containing submit repository. Fix potential crash (closing diff editor before command termination), use proper temp file name. Pass --non-interactive to "commit" to suppress editors being launched (despite -l). Reviewed-by: Marco Bubke <marco.bubke@nokia.com> Task-number: QTCREATORBUG-1503
This commit is contained in:
@@ -581,7 +581,12 @@ void MercurialPlugin::showCommitWidget(const QList<QPair<QString, QString> > &st
|
||||
|
||||
deleteCommitLog();
|
||||
|
||||
changeLog = new QTemporaryFile(this);
|
||||
// Open commit log
|
||||
QString changeLogPattern = QDir::tempPath();
|
||||
if (!changeLogPattern.endsWith(QLatin1Char('/')))
|
||||
changeLogPattern += QLatin1Char('/');
|
||||
changeLogPattern += QLatin1String("qtcreator-hg-XXXXXX.msg");
|
||||
changeLog = new QTemporaryFile(changeLogPattern, this);
|
||||
if (!changeLog->open()) {
|
||||
outputWindow->appendError(tr("Unable to generate a temporary file for the commit editor."));
|
||||
return;
|
||||
@@ -673,7 +678,6 @@ void MercurialPlugin::deleteCommitLog()
|
||||
if (changeLog) {
|
||||
delete changeLog;
|
||||
changeLog = 0;
|
||||
m_submitRepository.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user