changeset 24311:e02a0a419418

record: change recording function to work with crecord
author Laurent Charignon <lcharignon@fb.com>
date Thu, 12 Mar 2015 14:20:32 -0700
parents 6409fb6c934d
children f208ce59a6e5
files mercurial/cmdutil.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Mar 12 14:19:11 2015 -0700
+++ b/mercurial/cmdutil.py	Thu Mar 12 14:20:32 2015 -0700
@@ -14,6 +14,7 @@
 import changelog
 import bookmarks
 import encoding
+import crecord as crecordmod
 import lock as lockmod
 
 def parsealiases(cmd):
@@ -86,9 +87,10 @@
 
         newandmodifiedfiles = set()
         for h in chunks:
+            iscrecordhunk = isinstance(h, crecordmod.uihunk)
             ishunk = isinstance(h, patch.recordhunk)
             isnew = h.filename() in status.added
-            if ishunk and isnew and not h in originalchunks:
+            if (ishunk or iscrecordhunk) and isnew and not h in originalchunks:
                 newandmodifiedfiles.add(h.filename())
 
         modified = set(status.modified)