Mercurial > hgsubversion
diff hgsubversion/editor.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 | 297e2b4a6e2c |
children | bd9c292665fd |
line wrap: on
line diff
--- a/hgsubversion/editor.py +++ b/hgsubversion/editor.py @@ -406,7 +406,11 @@ class HgEditor(svnwrap.Editor): tag = self.meta.get_path_tag(copyfrom_path) if tag not in self.meta.tags: tag = None - if not self.meta.is_path_valid(copyfrom_path): + if not self.meta.is_path_valid(copyfrom_path, existing=False): + # The source path only exists at copyfrom_revision, use + # existing=False to guess a possible branch location and + # test it against the filemap. The actual path and + # revision will be resolved below if necessary. self.current.addmissing('%s/' % path) return path if tag: