mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
fetch_command: use the opener to read touched files
This commit is contained in:
parent
25e5c47562
commit
5739062901
@ -474,17 +474,16 @@ def stupid_svn_server_pull_rev(ui, svn, hg_editor, r):
|
||||
def filectxfn(repo, memctx, path):
|
||||
if path in deleted_files:
|
||||
raise IOError()
|
||||
disk_path = os.path.join(our_tempdir, path)
|
||||
if path in link_files:
|
||||
return context.memfilectx(path=path, data=link_files[path],
|
||||
islink=True, isexec=False,
|
||||
copied=False)
|
||||
fp = open(disk_path)
|
||||
data = opener(path).read()
|
||||
exe = exec_files.get(path, None)
|
||||
if exe is None and path in hg_editor.repo[parent_ha]:
|
||||
exe = 'x' in hg_editor.repo[parent_ha].filectx(path).flags()
|
||||
copied = copies.get(path)
|
||||
return context.memfilectx(path=path, data=fp.read(), islink=False,
|
||||
return context.memfilectx(path=path, data=data, islink=False,
|
||||
isexec=exe, copied=copied)
|
||||
except (core.SubversionException,
|
||||
BadPatchApply,
|
||||
|
Loading…
Reference in New Issue
Block a user