Mercurial > hgsubversion
diff hgsubversion/replay.py @ 1356:57d65269d30c
maps: allow an empty map to not convert specific branches
The test, test_fetch_mappings, has been updated as well.
author | Sean Farley <sean@farley.io> |
---|---|
date | Mon, 24 Mar 2014 11:20:57 -0500 |
parents | f2d1c59738f9 |
children | 0a6b3da6d34c |
line wrap: on
line diff
--- a/hgsubversion/replay.py +++ b/hgsubversion/replay.py @@ -121,6 +121,12 @@ def _convert_rev(ui, meta, svn, r, tbdel if branch in current.emptybranches and files: del current.emptybranches[branch] + if meta.skipbranch(branch): + # make sure we also get rid of it from emptybranches + if branch in current.emptybranches: + del current.emptybranches[branch] + continue + files = dict(files) parents = meta.get_parent_revision(rev.revnum, branch), revlog.nullid if parents[0] in closedrevs and branch in meta.closebranches: @@ -195,6 +201,9 @@ def _convert_rev(ui, meta, svn, r, tbdel # 2. handle branches that need to be committed without any files for branch in current.emptybranches: + if meta.skipbranch(branch): + continue + ha = meta.get_parent_revision(rev.revnum, branch) if ha == node.nullid: continue