##// END OF EJS Templates
changegroup: add "vfs" argument to "readbundle()" to pass relative filename
FUJIWARA Katsunori -
r20978:5b58714e default
parent child Browse files
Show More
@@ -214,7 +214,7 b' class headerlessfixup(object):'
214 return d
214 return d
215 return readexactly(self._fh, n)
215 return readexactly(self._fh, n)
216
216
217 def readbundle(fh, fname):
217 def readbundle(fh, fname, vfs=None):
218 header = readexactly(fh, 6)
218 header = readexactly(fh, 6)
219
219
220 if not fname:
220 if not fname:
@@ -222,6 +222,8 b' def readbundle(fh, fname):'
222 if not header.startswith('HG') and header.startswith('\0'):
222 if not header.startswith('HG') and header.startswith('\0'):
223 fh = headerlessfixup(fh, header)
223 fh = headerlessfixup(fh, header)
224 header = "HG10UN"
224 header = "HG10UN"
225 elif vfs:
226 fname = vfs.join(fname)
225
227
226 magic, version, alg = header[0:2], header[2:4], header[4:6]
228 magic, version, alg = header[0:2], header[2:4], header[4:6]
227
229
General Comments 0
You need to be logged in to leave comments. Login now