Mercurial > hg
comparison mercurial/exchange.py @ 21064:4d9d490d7bbe
bundle2: add a ui argument to readbundle
The bundle2 unbundler needs a ui argument. We are now passing this information
to `readbundle`.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 14 Apr 2014 15:45:30 -0400 |
parents | 7ca4f2049d3b |
children | f9a9a6d63e89 |
comparison
equal
deleted
inserted
replaced
21063:7ca4f2049d3b | 21064:4d9d490d7bbe |
---|---|
9 from node import hex, nullid | 9 from node import hex, nullid |
10 import errno | 10 import errno |
11 import util, scmutil, changegroup, base85 | 11 import util, scmutil, changegroup, base85 |
12 import discovery, phases, obsolete, bookmarks, bundle2 | 12 import discovery, phases, obsolete, bookmarks, bundle2 |
13 | 13 |
14 def readbundle(fh, fname, vfs=None): | 14 def readbundle(ui, fh, fname, vfs=None): |
15 header = changegroup.readexactly(fh, 6) | 15 header = changegroup.readexactly(fh, 6) |
16 | 16 |
17 if not fname: | 17 if not fname: |
18 fname = "stream" | 18 fname = "stream" |
19 if not header.startswith('HG') and header.startswith('\0'): | 19 if not header.startswith('HG') and header.startswith('\0'): |