diff hgsubversion/stupid.py @ 1028:c4b25a903ad3

layouts: consistently return None for default branch This makes the single and standard layouts consistent in what they return for the default branch. Previously, single had returned 'default' now they both return None. In addition, this fixes a now-exposed bug in stupid's convert_revision logic. Specifically, when a file is replaced by another file within the same branch, we treated that as replacing the entire branch. this bug was previously hidden because meta.split_branch_path and meta.localname were inconsistent in what they returned for the single layout. meta.split-branch_path is used to maintain the set of known branches, where meta.localname is used to determine the branch for the path being replaced. This resulted in erroneously hitting the condition that skipped paths outside branches we know about when considering replace operations from svn.
author David Schleimer <dschleimer@fb.com>
date Wed, 05 Jun 2013 11:00:06 -0700
parents 9c3b4f59e7e6
children 4e4c47351102
line wrap: on
line diff
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -722,9 +722,9 @@ def convert_rev(ui, meta, svn, r, tbdelt
                     r.revnum, branch, exact=True)]
                 if util.isancestor(pctx, fromctx):
                     continue
-        closed = checkbranch(meta, r, branch)
-        if closed is not None:
-            deleted_branches[branch] = closed
+            closed = checkbranch(meta, r, branch)
+            if closed is not None:
+                deleted_branches[branch] = closed
 
     date = meta.fixdate(r.date)
     check_deleted_branches = set(tbdelta['branches'][1])