changeset 1597:96b47ef8f740

remove a duplicate check in commit / fix a bug when merging files followed by revert
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 27 Dec 2005 12:52:25 -0600
parents 41366b7d6709
children 14d1f1868bf6
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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