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:
@@ -61,6 +61,8 @@ inline Core::IEditor* locateEditor(const Core::ICore *core, const char *property
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char nonInteractiveOptionC[] = "--noninteractive";
|
||||
|
||||
namespace Mercurial {
|
||||
namespace Internal {
|
||||
|
||||
@@ -533,7 +535,8 @@ void MercurialClient::commit(const QString &repositoryRoot, const QStringList &f
|
||||
// refuse to do "autoadd" on a commit with working directory only, as this will
|
||||
// add all the untracked stuff.
|
||||
QTC_ASSERT(!(autoAddRemove && files.isEmpty()), return)
|
||||
QStringList args(QLatin1String("commit"));
|
||||
QStringList args = QStringList(QLatin1String(nonInteractiveOptionC));
|
||||
args.append(QLatin1String("commit"));
|
||||
if (!committerInfo.isEmpty())
|
||||
args << QLatin1String("-u") << committerInfo;
|
||||
args << QLatin1String("-l") << commitMessageFile;
|
||||
|
Reference in New Issue
Block a user