Show More
@@ -71,7 +71,7 b' class shelvedfile(object):' | |||||
71 | def applybundle(self): |
|
71 | def applybundle(self): | |
72 | fp = self.opener() |
|
72 | fp = self.opener() | |
73 | try: |
|
73 | try: | |
74 | gen = exchange.readbundle(fp, self.fname, self.vfs) |
|
74 | gen = exchange.readbundle(self.repo.ui, fp, self.fname, self.vfs) | |
75 | changegroup.addchangegroup(self.repo, gen, 'unshelve', |
|
75 | changegroup.addchangegroup(self.repo, gen, 'unshelve', | |
76 | 'bundle:' + self.vfs.join(self.fname)) |
|
76 | 'bundle:' + self.vfs.join(self.fname)) | |
77 | finally: |
|
77 | finally: |
@@ -202,7 +202,7 b' class bundlerepository(localrepo.localre' | |||||
202 |
|
202 | |||
203 | self.tempfile = None |
|
203 | self.tempfile = None | |
204 | f = util.posixfile(bundlename, "rb") |
|
204 | f = util.posixfile(bundlename, "rb") | |
205 | self.bundle = exchange.readbundle(f, bundlename) |
|
205 | self.bundle = exchange.readbundle(ui, f, bundlename) | |
206 | if self.bundle.compressed(): |
|
206 | if self.bundle.compressed(): | |
207 | fdtemp, temp = self.vfs.mkstemp(prefix="hg-bundle-", |
|
207 | fdtemp, temp = self.vfs.mkstemp(prefix="hg-bundle-", | |
208 | suffix=".hg10un") |
|
208 | suffix=".hg10un") | |
@@ -220,7 +220,7 b' class bundlerepository(localrepo.localre' | |||||
220 | fptemp.close() |
|
220 | fptemp.close() | |
221 |
|
221 | |||
222 | f = self.vfs.open(self.tempfile, mode="rb") |
|
222 | f = self.vfs.open(self.tempfile, mode="rb") | |
223 | self.bundle = exchange.readbundle(f, bundlename, self.vfs) |
|
223 | self.bundle = exchange.readbundle(ui, f, bundlename, self.vfs) | |
224 |
|
224 | |||
225 | # dict with the mapping 'filename' -> position in the bundle |
|
225 | # dict with the mapping 'filename' -> position in the bundle | |
226 | self.bundlefilespos = {} |
|
226 | self.bundlefilespos = {} |
@@ -1736,7 +1736,7 b' def debugbundle(ui, bundlepath, all=None' | |||||
1736 | """lists the contents of a bundle""" |
|
1736 | """lists the contents of a bundle""" | |
1737 | f = hg.openpath(ui, bundlepath) |
|
1737 | f = hg.openpath(ui, bundlepath) | |
1738 | try: |
|
1738 | try: | |
1739 | gen = exchange.readbundle(f, bundlepath) |
|
1739 | gen = exchange.readbundle(ui, f, bundlepath) | |
1740 | if all: |
|
1740 | if all: | |
1741 | ui.write(("format: id, p1, p2, cset, delta base, len(delta)\n")) |
|
1741 | ui.write(("format: id, p1, p2, cset, delta base, len(delta)\n")) | |
1742 |
|
1742 | |||
@@ -5807,7 +5807,7 b' def unbundle(ui, repo, fname1, *fnames, ' | |||||
5807 | try: |
|
5807 | try: | |
5808 | for fname in fnames: |
|
5808 | for fname in fnames: | |
5809 | f = hg.openpath(ui, fname) |
|
5809 | f = hg.openpath(ui, fname) | |
5810 | gen = exchange.readbundle(f, fname) |
|
5810 | gen = exchange.readbundle(ui, f, fname) | |
5811 | modheads = changegroup.addchangegroup(repo, gen, 'unbundle', |
|
5811 | modheads = changegroup.addchangegroup(repo, gen, 'unbundle', | |
5812 | 'bundle:' + fname) |
|
5812 | 'bundle:' + fname) | |
5813 | finally: |
|
5813 | finally: |
@@ -11,7 +11,7 b' 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: |
@@ -147,7 +147,7 b' def strip(ui, repo, nodelist, backup="al' | |||||
147 | if saveheads or savebases: |
|
147 | if saveheads or savebases: | |
148 | ui.note(_("adding branch\n")) |
|
148 | ui.note(_("adding branch\n")) | |
149 | f = vfs.open(chgrpfile, "rb") |
|
149 | f = vfs.open(chgrpfile, "rb") | |
150 | gen = exchange.readbundle(f, chgrpfile, vfs) |
|
150 | gen = exchange.readbundle(ui, f, chgrpfile, vfs) | |
151 | if not repo.ui.verbose: |
|
151 | if not repo.ui.verbose: | |
152 | # silence internal shuffling chatter |
|
152 | # silence internal shuffling chatter | |
153 | repo.ui.pushbuffer() |
|
153 | repo.ui.pushbuffer() |
@@ -766,7 +766,7 b' def unbundle(repo, proto, heads):' | |||||
766 | try: |
|
766 | try: | |
767 | proto.getfile(fp) |
|
767 | proto.getfile(fp) | |
768 | fp.seek(0) |
|
768 | fp.seek(0) | |
769 | gen = exchange.readbundle(fp, None) |
|
769 | gen = exchange.readbundle(repo.ui, fp, None) | |
770 | r = exchange.unbundle(repo, gen, their_heads, 'serve', |
|
770 | r = exchange.unbundle(repo, gen, their_heads, 'serve', | |
771 | proto._client()) |
|
771 | proto._client()) | |
772 | return pushres(r) |
|
772 | return pushres(r) |
General Comments 0
You need to be logged in to leave comments.
Login now