# HG changeset patch # User FUJIWARA Katsunori # Date 2014-03-08 16:03:28 # Node ID 5b58714e97edbbd1e09f7717cf6564e0191d8f57 # Parent a57dcd11be3407518cccc24d0f3a0d2b4c5301cd changegroup: add "vfs" argument to "readbundle()" to pass relative filename diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -214,7 +214,7 @@ class headerlessfixup(object): return d return readexactly(self._fh, n) -def readbundle(fh, fname): +def readbundle(fh, fname, vfs=None): header = readexactly(fh, 6) if not fname: @@ -222,6 +222,8 @@ def readbundle(fh, fname): if not header.startswith('HG') and header.startswith('\0'): fh = headerlessfixup(fh, header) header = "HG10UN" + elif vfs: + fname = vfs.join(fname) magic, version, alg = header[0:2], header[2:4], header[4:6]