diff mercurial/dirstate.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 98988cc3723a
children d9e85a75dbda
line wrap: on
line diff
--- a/mercurial/dirstate.py	Sat Aug 27 20:58:53 2005 -0700
+++ b/mercurial/dirstate.py	Sat Aug 27 22:04:17 2005 -0700
@@ -141,6 +141,8 @@
                 st_size = kw.get('st_size', s.st_size)
                 st_mtime = kw.get('st_mtime', s.st_mtime)
                 self.map[f] = (state, s.st_mode, st_size, st_mtime)
+            if self.copies.has_key(f):
+                del self.copies[f]
 
     def forget(self, files):
         if not files: return