Mercurial > hg
comparison mercurial/filelog.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 | 0cdd73b0767c |
children | 8ca9f5b17257 |
comparison
equal
deleted
inserted
replaced
1116:0cdd73b0767c | 1117:30ab5b8ee8ec |
---|---|
57 text = "\1\n" + "".join(mt) + "\1\n" + text | 57 text = "\1\n" + "".join(mt) + "\1\n" + text |
58 return self.addrevision(text, transaction, link, p1, p2) | 58 return self.addrevision(text, transaction, link, p1, p2) |
59 | 59 |
60 def renamed(self, node): | 60 def renamed(self, node): |
61 if 0 and self.parents(node)[0] != nullid: | 61 if 0 and self.parents(node)[0] != nullid: |
62 print "shortcut" | |
63 return False | 62 return False |
64 m = self.readmeta(node) | 63 m = self.readmeta(node) |
65 if m and m.has_key("copy"): | 64 if m and m.has_key("copy"): |
66 return (m["copy"], bin(m["copyrev"])) | 65 return (m["copy"], bin(m["copyrev"])) |
67 return False | 66 return False |