Mercurial > hg-stable
changeset 20978:5b58714e97ed
changegroup: add "vfs" argument to "readbundle()" to pass relative filename
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 09 Mar 2014 01:03:28 +0900 |
parents | a57dcd11be34 |
children | ad5b61370514 |
files | mercurial/changegroup.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changegroup.py Sun Mar 09 01:03:28 2014 +0900 +++ b/mercurial/changegroup.py Sun Mar 09 01:03:28 2014 +0900 @@ -214,7 +214,7 @@ 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 @@ 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]