diff fetch_command.py @ 59:430af23bef4a

Performance fix for branches-from-tags in real replay, which is tied up with changes that fix problems when trunk is not the oldest branch. Also includes fixes for copying from a tag that we chose not to create (eg tagging a vendor branch) and includes tests for all of those things.
author Augie Fackler <durin42@gmail.com>
date Tue, 04 Nov 2008 16:38:16 -0600
parents a8b9c7e7c2ac
children 2e30b59a9c19
line wrap: on
line diff
--- a/fetch_command.py
+++ b/fetch_command.py
@@ -435,7 +435,8 @@ def stupid_svn_server_pull_rev(ui, svn, 
                         files_touched.add(d)
         if delete_all_files:
             for p in hg_editor.repo[parent_ha].manifest().iterkeys():
-                files_touched.add(p)
+                if p:
+                    files_touched.add(p)
         if not used_diff:
             for p in reduce(operator.add, [[os.path.join(x[0], y) for y in x[2]]
                                            for x in
@@ -447,7 +448,8 @@ def stupid_svn_server_pull_rev(ui, svn, 
                 files_touched.add(p_real)
             for p in hg_editor.repo[parent_ha].manifest().iterkeys():
                 # TODO this might not be a required step.
-                files_touched.add(p)
+                if p:
+                    files_touched.add(p)
         date = r.date.replace('T', ' ').replace('Z', '').split('.')[0]
         date += ' -0000'
         def filectxfn(repo, memctx, path):
@@ -465,6 +467,8 @@ def stupid_svn_server_pull_rev(ui, svn, 
         extra = {}
         if b:
             extra['branch'] = b
+        if '' in files_touched:
+            files_touched.remove('')
         if parent_ha != node.nullid or files_touched:
             # TODO(augie) remove this debug code? Or maybe it's sane to have it.
             for f in files_touched: