remove a duplicate check in commit / fix a bug when merging files
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 27 Dec 2005 12:52:25 -0600
changeset 1597 96b47ef8f740
parent 1596 41366b7d6709
child 1598 14d1f1868bf6
remove a duplicate check in commit / fix a bug when merging files followed by revert
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Dec 27 12:52:10 2005 -0600
+++ b/mercurial/localrepo.py	Tue Dec 27 12:52:25 2005 -0600
@@ -400,10 +400,6 @@
                 fp1 = m1.get(f, nullid)
                 fp2 = m2.get(f, nullid)
 
-            # is the same revision on two branches of a merge?
-            if fp2 == fp1:
-                fp2 = nullid
-
             if fp2 != nullid:
                 # is one parent an ancestor of the other?
                 fpa = r.ancestor(fp1, fp2)
@@ -413,7 +409,7 @@
                     fp2 = nullid
 
                 # is the file unmodified from the parent?
-                if not meta and t == r.read(fp1):
+                if not meta and t == r.read(fp1) and fp2 == nullid:
                     # record the proper existing parent in manifest
                     # no need to add a revision
                     new[f] = fp1