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.
This commit is contained in:
Dan Villiom Podlaski Christiansen 2010-08-11 19:57:34 +02:00
parent 57e5b36411
commit 22ba8a8561

View File

@ -423,7 +423,11 @@ def fetch_branchrev(svn, meta, branch, branchpath, r, parentctx):
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 + '/'