1. TortoiseHg
  2. TortoiseHg
  3. thg


Yuya Nishihara  committed 9241b78

commit: exclude all files on new/close branch if no file selected (fixes #1985)

Commit widget allows branch operation with no file selected, but Mercurial
interpret it as "commit all files". This patch avoids it by excluding all
files, which is the same hack as mqNewRefreshCommand().

  • Participants
  • Parent commits 6fe7d4a
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/commit.py

View file
         if amend:
+        if not self.files and (brcmd or newbranch) and not merge:
+            # make sure to commit empty changeset by excluding all files
+            cmdline.extend(['--exclude', repo.root])
         cmdline.extend([repo.wjoin(f) for f in self.files])
         if len(repo.parents()) == 1: