hgext/record.py
branchstable
changeset 11237 feb2a58fc592
parent 11236 cfa6a726ef6d
child 11238 a5922547b5cc
--- a/hgext/record.py	Mon May 31 13:43:03 2010 +0200
+++ b/hgext/record.py	Mon May 31 17:13:15 2010 +0900
@@ -379,7 +379,9 @@
       a - record all changes to all remaining files
       q - quit, recording no changes
 
-      ? - display help'''
+      ? - display help
+
+    This command is not available when committing a merge.'''
 
     dorecord(ui, repo, commands.commit, *pats, **opts)
 
@@ -422,6 +424,11 @@
         left in place, so the user can continue his work.
         """
 
+        merge = len(repo[None].parents()) > 1
+        if merge:
+            raise util.Abort(_('cannot partially commit a merge '
+                               '(use hg commit instead)'))
+
         changes = repo.status(match=match)[:3]
         diffopts = mdiff.diffopts(git=True, nodates=True)
         chunks = patch.diff(repo, changes=changes, opts=diffopts)