Fix theoretical issue in filecommit.
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 27 Aug 2007 14:21:04 -0300
changeset 5228 8050f13772f6
parent 5227 466323968b23
child 5229 dee573ba79f1
Fix theoretical issue in filecommit. If the file was copied, we don't want to reuse the original entry. I think this is mostly a theoretical issue - when there are copies, fp1 == nullid, so it's very unlikely that the fl.cmp(fp1, t) would think the file was unmodified. In any case, if there was a copy, we should forcefully create a new entry.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Aug 27 14:21:04 2007 -0300
+++ b/mercurial/localrepo.py	Mon Aug 27 14:21:04 2007 -0300
@@ -626,7 +626,7 @@
                 fp2 = nullid
 
         # is the file unmodified from the parent? report existing entry
-        if fp2 == nullid and not fl.cmp(fp1, t):
+        if fp2 == nullid and not fl.cmp(fp1, t) and not meta:
             return fp1
 
         changelist.append(fn)