--- a/Plugins/VcsPlugins/vcsMercurial/hg.py Sat May 05 19:23:18 2012 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/hg.py Wed May 09 20:07:29 2012 +0200 @@ -427,10 +427,13 @@ if self.__commitDialog is not None: msg = self.__commitDialog.logMessage() + amend = self.__commitDialog.amend() self.__commitDialog.accepted.disconnect(self.__vcsCommit_Step2) self.__commitDialog = None + else: + amend = False - if not msg: + if not msg and not amend: msg = '***' args = [] @@ -440,8 +443,11 @@ args.append("-v") if closeBranch: args.append("--close-branch") - args.append("--message") - args.append(msg) + if amend: + args.append("--amend") + if msg: + args.append("--message") + args.append(msg) if isinstance(name, list): dname, fnames = self.splitPathList(name) else: @@ -1270,7 +1276,7 @@ ).format(self.versionStr, url, "\n".join(info)) ############################################################################ - ## Private Subversion specific methods are below. + ## Private Mercurial specific methods are below. ############################################################################ def __hgURL(self, url): @@ -1278,7 +1284,7 @@ Private method to format a url for Mercurial. @param url unformatted url string (string) - @return properly formated url for subversion (string) + @return properly formated url for mercurial (string) """ url = self.hgNormalizeURL(url) url = url.split(':', 2) @@ -1307,7 +1313,7 @@ Public method to normalize a url for Mercurial. @param url url string (string) - @return properly normalized url for subversion (string) + @return properly normalized url for mercurial (string) """ url = url.replace('\\', '/') if url.endswith('/'): @@ -1321,7 +1327,7 @@ @param name file/directory name to be copied (string) @param project reference to the project object - @return flag indicating successfull operation (boolean) + @return flag indicating successful operation (boolean) """ dlg = HgCopyDialog(name) res = False