diff hgsubversion/editor.py @ 528:052050ca59d6

replay: disable maybeedit filtering, could discard copy records Copy records were not taken in account when telling whether a file was changed or not. Besides, the only place maybeedits were added was when recording directory copies.
author Patrick Mezard <pmezard@gmail.com>
date Fri, 29 Jan 2010 23:36:14 +0100
parents 839734dfb5c7
children e38f110e7088
line wrap: on
line diff
--- a/hgsubversion/editor.py
+++ b/hgsubversion/editor.py
@@ -35,7 +35,7 @@ class RevisionData(object):
     __slots__ = [
         'file', 'files', 'deleted', 'rev', 'execfiles', 'symlinks', 'batons',
         'copies', 'missing', 'emptybranches', 'base', 'externals', 'ui',
-        'exception', 'maybeedits',
+        'exception',
     ]
 
     def __init__(self, ui):
@@ -57,7 +57,6 @@ class RevisionData(object):
         self.base = None
         self.externals = {}
         self.exception = None
-        self.maybeedits = set()
 
     def set(self, path, data, isexec=False, islink=False):
         if islink:
@@ -283,8 +282,7 @@ class HgEditor(delta.Editor):
                 parentctx = self.repo.changectx(parentid)
                 for k, v in copies.iteritems():
                     if util.issamefile(parentctx, cp_f_ctx, v):
-                        self.current.maybeedits.add(k)
-                        self.current.copies.update({k: v})
+                        self.current.copies[k] = v
         return path
 
     @ieditor
@@ -330,11 +328,6 @@ class HgEditor(delta.Editor):
                 or self.current.file in self.current.missing), '%s not found' % self.current.file
         if self.current.file in self.current.missing:
             return lambda x: None
-        # If we apply a textdelta, the body of the file is going to change.
-        # There's little reason to check and see if it matches the parent, because
-        # that's extremely unlikely. If we see cases where that happens,
-        # maybe this line can go, but until then, it stays.
-        self.current.maybeedits.discard(self.current.file)
         base = self.current.files[self.current.file]
         source = cStringIO.StringIO(base)
         target = cStringIO.StringIO()