record: change recording function to work with crecord
authorLaurent Charignon <lcharignon@fb.com>
Thu, 12 Mar 2015 14:20:32 -0700
changeset 24311 e02a0a419418
parent 24310 6409fb6c934d
child 24312 f208ce59a6e5
record: change recording function to work with crecord
mercurial/cmdutil.py
--- 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)