1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Steve Borho  committed 0d52660

commit: when file list is empty give -X `hg root` unless merging

This fixes the two branch cases, changing branch or closing a branch.

Closes #1646

  • Participants
  • Parent commits 2b427db
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgtk/commit.py

View file
  • Ignore whitespace
         if self.qnew:
             cmdline[1] = 'qnew'
             cmdline.append('--force')
-            if not files:
-                cmdline += ['-X', self.repo.root]
         elif self.qheader is not None:
             cmdline[1] = 'qrefresh'
-            if not files:
-                cmdline += ['-X', self.repo.root]
         elif self.opts['addremove']:
             cmdline += ['--addremove']
         if self.opts['user'] or user:
         if self.opts['date']:
             cmdline.extend(['--date', self.opts['date']])
         files += self.opts['include']
+        if not files and not self.is_merge():
+            cmdline += ['-X', self.repo.root]
         cmdline += ['--message', hglib.fromutf(self.opts['message'])]
         if self.qnew:
             cmdline += [hglib.fromutf(self.get_qnew_name())]
-        cmdline.append('--')
-        cmdline += files
+        if files:
+            cmdline.append('--')
+            cmdline += files
         if autopush:
             cmdline = (cmdline, ['hg', 'push'])
         def done(return_code, *args):