Commits

Angel Ezquerra committed 4d449fc

commit: allow amending a revision without selecting any files

When a revision is amended but no files are selected, we must tell mercurial to
not update any files, but update the meta-data (e.g. the commit message, etc)
if necessary.

  • Participants
  • Parent commits b9ebfc7
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgqt/commit.py

         else:
             merge = False
             self.files = self.stwidget.getChecked('MAR?!S')
-        if not (self.files or brcmd or newbranch or merge):
+        if not (self.files or brcmd or newbranch or amend or merge):
             qtlib.WarningMsgBox(_('No files checked'),
                                 _('No modified files checkmarked for commit'),
                                 parent=self)
         if amend:
             cmdline.append('--amend')
 
-        if not self.files and (brcmd or newbranch) and not merge:
+        if not self.files and (brcmd or newbranch or amend) and not merge:
             # make sure to commit empty changeset by excluding all files
             cmdline.extend(['--exclude', repo.root])