# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1281549454 -7200 # Node ID 1add57910c82fc2da0071237ca376acb2743c8cd # Parent dcac6dc1abe61bed2d222083aaf4a64c759c5787 stupid: remove an incorrect, implicit assumption in fetch_branchrev() The code in fetch_branchrev() could fail under relatively obscure circumstances: it combined two strings (path & child) by concatenating them with '/' inserted in the middle. However, convert_rev() contains an assertion that no touched file paths start with '/'. Combined, these two amounted to an incorrect assumption that no files where touched within an empty branchpath. diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py --- a/hgsubversion/stupid.py +++ b/hgsubversion/stupid.py @@ -423,7 +423,11 @@ def fetch_branchrev(svn, meta, branch, b dirpath = branchprefix + path for child, k in svn.list_files(dirpath, r.revnum): if k == 'f': - files.append(path + '/' + child) + if path: + childpath = '%s/%s' % (path, child) + else: + childpath = child + files.append(childpath) if e.action == 'R': # Check all files in replaced directory path = path + '/'