hgext/histedit.py
changeset 29831 e1a4015f5e34
parent 29470 2ff243c415b4
child 29852 d5883fd055c6
--- a/hgext/histedit.py	Sun Aug 21 08:00:18 2016 +0000
+++ b/hgext/histedit.py	Sun Aug 21 08:03:22 2016 +0000
@@ -573,18 +573,7 @@
     copied = copies.pathcopies(base, last)
 
     # prune files which were reverted by the updates
-    def samefile(f):
-        if f in last.manifest():
-            a = last.filectx(f)
-            if f in base.manifest():
-                b = base.filectx(f)
-                return (a.data() == b.data()
-                        and a.flags() == b.flags())
-            else:
-                return False
-        else:
-            return f not in base.manifest()
-    files = [f for f in files if not samefile(f)]
+    files = [f for f in files if not cmdutil.samefile(f, last, base)]
     # commit version of these files as defined by head
     headmf = last.manifest()
     def filectxfn(repo, ctx, path):