diff --git a/hgext/shelve.py b/hgext/shelve.py --- a/hgext/shelve.py +++ b/hgext/shelve.py @@ -43,6 +43,7 @@ class shelvedfile(object): self.repo = repo self.name = name self.vfs = scmutil.vfs(repo.join('shelved')) + self.ui = self.repo.ui if filetype: self.fname = name + '.' + filetype else: @@ -82,7 +83,7 @@ class shelvedfile(object): return bundlerepo.bundlerepository(self.repo.baseui, self.repo.root, self.vfs.join(self.fname)) def writebundle(self, cg): - changegroup.writebundle(cg, self.fname, 'HG10UN', self.vfs) + changegroup.writebundle(self.ui, cg, self.fname, 'HG10UN', self.vfs) class shelvedstate(object): """Handle persistence during unshelving operations. diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -410,7 +410,7 @@ def getremotechanges(ui, repo, other, on else: cg = other.changegroupsubset(incoming, rheads, 'incoming') bundletype = localrepo and "HG10BZ" or "HG10UN" - fname = bundle = changegroup.writebundle(cg, bundlename, bundletype) + fname = bundle = changegroup.writebundle(ui, cg, bundlename, bundletype) # keep written bundle? if bundlename: bundle = None diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -79,7 +79,7 @@ bundletypes = { # hgweb uses this list to communicate its preferred type bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] -def writebundle(cg, filename, bundletype, vfs=None): +def writebundle(ui, cg, filename, bundletype, vfs=None): """Write a bundle file and return its filename. Existing files will not be overwritten. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1217,7 +1217,7 @@ def bundle(ui, repo, fname, dest=None, * scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) return 1 - changegroup.writebundle(cg, fname, bundletype) + changegroup.writebundle(ui, cg, fname, bundletype) @command('cat', [('o', 'output', '', @@ -2165,7 +2165,7 @@ def debuggetbundle(ui, repopath, bundlep bundletype = btypes.get(bundletype) if bundletype not in changegroup.bundletypes: raise util.Abort(_('unknown bundle type specified with --type')) - changegroup.writebundle(bundle, bundlepath, bundletype) + changegroup.writebundle(ui, bundle, bundlepath, bundletype) @command('debugignore', [], '') def debugignore(ui, repo, *values, **opts): diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -193,7 +193,7 @@ class httppeer(wireproto.wirepeer): type = x break - tempname = changegroup.writebundle(cg, None, type) + tempname = changegroup.writebundle(self.ui, cg, None, type) fp = httpconnection.httpsendfile(self.ui, tempname, "rb") headers = {'Content-Type': 'application/mercurial-0.1'} diff --git a/mercurial/repair.py b/mercurial/repair.py --- a/mercurial/repair.py +++ b/mercurial/repair.py @@ -31,7 +31,7 @@ def _bundle(repo, bases, heads, node, su bundletype = "HG10BZ" else: bundletype = "HG10UN" - return changegroup.writebundle(cg, name, bundletype, vfs) + return changegroup.writebundle(repo.ui, cg, name, bundletype, vfs) def _collectfiles(repo, striprev): """find out the filelogs affected by the strip"""