Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/localrepo.py @ 1117:30ab5b8ee8ec
fix some rename/copy bugs
- delete copy information when we update dirstate
hg was keeping the copy state and marking things as copied on
multiple commits
- files that are renamed should have no parents
if you do a rename/copy to an existing file, it should not be marked
as descending from its previous revisions.
- remove spurious print from filelog.renamed
- add some more copy tests
author | mpm@selenic.com |
---|---|
date | Sat, 27 Aug 2005 22:04:17 -0700 |
parents | c81d264cd17d |
children | 899b619a7eb2 |
line wrap: on
line diff
--- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -329,16 +329,18 @@ class localrepository: self.ui.warn("trouble committing %s!\n" % f) raise + r = self.file(f) + meta = {} cp = self.dirstate.copied(f) if cp: meta["copy"] = cp meta["copyrev"] = hex(m1.get(cp, m2.get(cp, nullid))) self.ui.debug(" %s: copy %s:%s\n" % (f, cp, meta["copyrev"])) - - r = self.file(f) - fp1 = m1.get(f, nullid) - fp2 = m2.get(f, nullid) + fp1, fp2 = nullid, nullid + else: + fp1 = m1.get(f, nullid) + fp2 = m2.get(f, nullid) # is the same revision on two branches of a merge? if fp2 == fp1: