mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
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:
parent
57e5b36411
commit
22ba8a8561
@ -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 + '/'
|
||||
|
Loading…
Reference in New Issue
Block a user