diff hgsubversion/svnmeta.py @ 950:a80b01ceb1fc

editor: relax copyfrom dir checks to avoid extra missing entries When renaming a branch you get something like: D /branch/bar A /branch/foo (from /branch/foo:42) Unfortunately, the branch layout for the revision being converted is computed before starting to convert it. It means the copyfrom path supplied in the add_directory() for /branch/foo will be be considered invalid, be added to missing and fetched the slow way despite being in the repository history. Avoid that by checking the path looks like a branch path and matching it with the filemap. It will be resolved afterwards anyway.
author Patrick Mezard <patrick@mezard.eu>
date Sat, 06 Oct 2012 10:10:35 +0200
parents c6388ed0ec0a
children 9c3b4f59e7e6
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -393,10 +393,10 @@ class SVNMeta(object):
                 return {ln: (src_branch, src_rev, revnum)}
         return {}
 
-    def is_path_valid(self, path):
+    def is_path_valid(self, path, existing=True):
         if path is None:
             return False
-        subpath = self.split_branch_path(path)[0]
+        subpath = self.split_branch_path(path, existing)[0]
         if subpath is None:
             return False
         return subpath in self.filemap