changeset 123:58de7aea8a77

Fix a bug in replay convert where replaced files that couldn't use replay would sometimes end up having no content.
author Augie Fackler <durin42@gmail.com>
date Wed, 03 Dec 2008 22:51:03 -0600
parents 04c92c2c4501
children 291925677a9f
files hg_delta_editor.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hg_delta_editor.py
+++ b/hg_delta_editor.py
@@ -188,6 +188,8 @@ class HgChangeReceiver(delta.Editor):
         self.current_files[path] = data
         self.current_files_exec[path] = isexec
         self.current_files_symlink[path] = islink
+        if path in self.deleted_files:
+            del self.deleted_files[path]
 
     def _normalize_path(self, path):
         '''Normalize a path to strip of leading slashes and our subdir if we
@@ -507,17 +509,17 @@ class HgChangeReceiver(delta.Editor):
             return True
         if parentctx.rev() > childctx.rev():
             parentctx, childctx = childctx, parentctx
-        
+
         def selfandancestors(selfctx):
             yield selfctx
             for ctx in selfctx.ancestors():
                 yield ctx
-                
+
         files = dict.fromkeys(files)
         for pctx in selfandancestors(childctx):
             if pctx.rev() <= parentctx.rev():
                 return True
-            for f in pctx.files():                
+            for f in pctx.files():
                 if f in files:
                     return False
         # parentctx is not an ancestor of childctx, files are unrelated