mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
bundles: turn nbchanges int into a bytestr using pycompat.bytestr
Fixes some python 3 failures.
This commit is contained in:
parent
20e593170c
commit
fdaf985a63
@ -1444,7 +1444,7 @@ def _addpartsfromopts(ui, repo, bundler, source, outgoing, opts):
|
||||
part = bundler.newpart('changegroup', data=cg.getchunks())
|
||||
part.addparam('version', cg.version)
|
||||
if 'clcount' in cg.extras:
|
||||
part.addparam('nbchanges', str(cg.extras['clcount']),
|
||||
part.addparam('nbchanges', '%d' % cg.extras['clcount'],
|
||||
mandatory=False)
|
||||
if opts.get('phases') and repo.revs('%ln and secret()',
|
||||
outgoing.missingheads):
|
||||
@ -1520,7 +1520,7 @@ def writebundle(ui, cg, filename, bundletype, vfs=None, compression=None,
|
||||
part = bundle.newpart('changegroup', data=cg.getchunks())
|
||||
part.addparam('version', cg.version)
|
||||
if 'clcount' in cg.extras:
|
||||
part.addparam('nbchanges', str(cg.extras['clcount']),
|
||||
part.addparam('nbchanges', '%d' % cg.extras['clcount'],
|
||||
mandatory=False)
|
||||
chunkiter = bundle.getchunks()
|
||||
else:
|
||||
|
@ -1640,7 +1640,8 @@ def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None,
|
||||
part = bundler.newpart('changegroup', data=cgstream)
|
||||
if cgversions:
|
||||
part.addparam('version', version)
|
||||
part.addparam('nbchanges', str(len(outgoing.missing)), mandatory=False)
|
||||
part.addparam('nbchanges', '%d' % len(outgoing.missing),
|
||||
mandatory=False)
|
||||
if 'treemanifest' in repo.requirements:
|
||||
part.addparam('treemanifest', '1')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user