Show More
@@ -43,6 +43,7 b' class shelvedfile(object):' | |||||
43 | self.repo = repo |
|
43 | self.repo = repo | |
44 | self.name = name |
|
44 | self.name = name | |
45 | self.vfs = scmutil.vfs(repo.join('shelved')) |
|
45 | self.vfs = scmutil.vfs(repo.join('shelved')) | |
|
46 | self.ui = self.repo.ui | |||
46 | if filetype: |
|
47 | if filetype: | |
47 | self.fname = name + '.' + filetype |
|
48 | self.fname = name + '.' + filetype | |
48 | else: |
|
49 | else: | |
@@ -82,7 +83,7 b' class shelvedfile(object):' | |||||
82 | return bundlerepo.bundlerepository(self.repo.baseui, self.repo.root, |
|
83 | return bundlerepo.bundlerepository(self.repo.baseui, self.repo.root, | |
83 | self.vfs.join(self.fname)) |
|
84 | self.vfs.join(self.fname)) | |
84 | def writebundle(self, cg): |
|
85 | def writebundle(self, cg): | |
85 | changegroup.writebundle(cg, self.fname, 'HG10UN', self.vfs) |
|
86 | changegroup.writebundle(self.ui, cg, self.fname, 'HG10UN', self.vfs) | |
86 |
|
87 | |||
87 | class shelvedstate(object): |
|
88 | class shelvedstate(object): | |
88 | """Handle persistence during unshelving operations. |
|
89 | """Handle persistence during unshelving operations. |
@@ -410,7 +410,7 b' def getremotechanges(ui, repo, other, on' | |||||
410 | else: |
|
410 | else: | |
411 | cg = other.changegroupsubset(incoming, rheads, 'incoming') |
|
411 | cg = other.changegroupsubset(incoming, rheads, 'incoming') | |
412 | bundletype = localrepo and "HG10BZ" or "HG10UN" |
|
412 | bundletype = localrepo and "HG10BZ" or "HG10UN" | |
413 | fname = bundle = changegroup.writebundle(cg, bundlename, bundletype) |
|
413 | fname = bundle = changegroup.writebundle(ui, cg, bundlename, bundletype) | |
414 | # keep written bundle? |
|
414 | # keep written bundle? | |
415 | if bundlename: |
|
415 | if bundlename: | |
416 | bundle = None |
|
416 | bundle = None |
@@ -79,7 +79,7 b' bundletypes = {' | |||||
79 | # hgweb uses this list to communicate its preferred type |
|
79 | # hgweb uses this list to communicate its preferred type | |
80 | bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] |
|
80 | bundlepriority = ['HG10GZ', 'HG10BZ', 'HG10UN'] | |
81 |
|
81 | |||
82 | def writebundle(cg, filename, bundletype, vfs=None): |
|
82 | def writebundle(ui, cg, filename, bundletype, vfs=None): | |
83 | """Write a bundle file and return its filename. |
|
83 | """Write a bundle file and return its filename. | |
84 |
|
84 | |||
85 | Existing files will not be overwritten. |
|
85 | Existing files will not be overwritten. |
@@ -1217,7 +1217,7 b' def bundle(ui, repo, fname, dest=None, *' | |||||
1217 | scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) |
|
1217 | scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) | |
1218 | return 1 |
|
1218 | return 1 | |
1219 |
|
1219 | |||
1220 | changegroup.writebundle(cg, fname, bundletype) |
|
1220 | changegroup.writebundle(ui, cg, fname, bundletype) | |
1221 |
|
1221 | |||
1222 | @command('cat', |
|
1222 | @command('cat', | |
1223 | [('o', 'output', '', |
|
1223 | [('o', 'output', '', | |
@@ -2165,7 +2165,7 b' def debuggetbundle(ui, repopath, bundlep' | |||||
2165 | bundletype = btypes.get(bundletype) |
|
2165 | bundletype = btypes.get(bundletype) | |
2166 | if bundletype not in changegroup.bundletypes: |
|
2166 | if bundletype not in changegroup.bundletypes: | |
2167 | raise util.Abort(_('unknown bundle type specified with --type')) |
|
2167 | raise util.Abort(_('unknown bundle type specified with --type')) | |
2168 | changegroup.writebundle(bundle, bundlepath, bundletype) |
|
2168 | changegroup.writebundle(ui, bundle, bundlepath, bundletype) | |
2169 |
|
2169 | |||
2170 | @command('debugignore', [], '') |
|
2170 | @command('debugignore', [], '') | |
2171 | def debugignore(ui, repo, *values, **opts): |
|
2171 | def debugignore(ui, repo, *values, **opts): |
@@ -193,7 +193,7 b' class httppeer(wireproto.wirepeer):' | |||||
193 | type = x |
|
193 | type = x | |
194 | break |
|
194 | break | |
195 |
|
195 | |||
196 | tempname = changegroup.writebundle(cg, None, type) |
|
196 | tempname = changegroup.writebundle(self.ui, cg, None, type) | |
197 | fp = httpconnection.httpsendfile(self.ui, tempname, "rb") |
|
197 | fp = httpconnection.httpsendfile(self.ui, tempname, "rb") | |
198 | headers = {'Content-Type': 'application/mercurial-0.1'} |
|
198 | headers = {'Content-Type': 'application/mercurial-0.1'} | |
199 |
|
199 |
@@ -31,7 +31,7 b' def _bundle(repo, bases, heads, node, su' | |||||
31 | bundletype = "HG10BZ" |
|
31 | bundletype = "HG10BZ" | |
32 | else: |
|
32 | else: | |
33 | bundletype = "HG10UN" |
|
33 | bundletype = "HG10UN" | |
34 | return changegroup.writebundle(cg, name, bundletype, vfs) |
|
34 | return changegroup.writebundle(repo.ui, cg, name, bundletype, vfs) | |
35 |
|
35 | |||
36 | def _collectfiles(repo, striprev): |
|
36 | def _collectfiles(repo, striprev): | |
37 | """find out the filelogs affected by the strip""" |
|
37 | """find out the filelogs affected by the strip""" |
General Comments 0
You need to be logged in to leave comments.
Login now