comparison mercurial/localrepo.py @ 5228:8050f13772f6

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.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 27 Aug 2007 14:21:04 -0300
parents 466323968b23
children dee573ba79f1
comparison
equal deleted inserted replaced
5227:466323968b23 5228:8050f13772f6
624 fp1, fp2 = fp2, nullid 624 fp1, fp2 = fp2, nullid
625 elif fpa == fp2: 625 elif fpa == fp2:
626 fp2 = nullid 626 fp2 = nullid
627 627
628 # is the file unmodified from the parent? report existing entry 628 # is the file unmodified from the parent? report existing entry
629 if fp2 == nullid and not fl.cmp(fp1, t): 629 if fp2 == nullid and not fl.cmp(fp1, t) and not meta:
630 return fp1 630 return fp1
631 631
632 changelist.append(fn) 632 changelist.append(fn)
633 return fl.add(t, meta, transaction, linkrev, fp1, fp2) 633 return fl.add(t, meta, transaction, linkrev, fp1, fp2)
634 634