Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Lint Skipped |
Unit Tests Skipped |
# developer config: devel.legacy.exchange | # developer config: devel.legacy.exchange | ||||
legexc = ui.configlist('devel', 'legacy.exchange') | legexc = ui.configlist('devel', 'legacy.exchange') | ||||
forcebundle1 = 'bundle2' not in legexc and 'bundle1' in legexc | forcebundle1 = 'bundle2' not in legexc and 'bundle1' in legexc | ||||
canbundle2 = (not forcebundle1 | canbundle2 = (not forcebundle1 | ||||
and other.capable('getbundle') | and other.capable('getbundle') | ||||
and other.capable('bundle2')) | and other.capable('bundle2')) | ||||
if canbundle2: | if canbundle2: | ||||
kwargs = {} | kwargs = {} | ||||
kwargs['common'] = common | kwargs[r'common'] = common | ||||
kwargs['heads'] = rheads | kwargs[r'heads'] = rheads | ||||
kwargs['bundlecaps'] = exchange.caps20to10(repo) | kwargs[r'bundlecaps'] = exchange.caps20to10(repo) | ||||
kwargs['cg'] = True | kwargs[r'cg'] = True | ||||
b2 = other.getbundle('incoming', **kwargs) | b2 = other.getbundle('incoming', **kwargs) | ||||
fname = bundle = changegroup.writechunks(ui, b2._forwardchunks(), | fname = bundle = changegroup.writechunks(ui, b2._forwardchunks(), | ||||
bundlename) | bundlename) | ||||
else: | else: | ||||
if other.capable('getbundle'): | if other.capable('getbundle'): | ||||
cg = other.getbundle('incoming', common=common, heads=rheads) | cg = other.getbundle('incoming', common=common, heads=rheads) | ||||
elif onlyheads is None and not other.capable('changegroupsubset'): | elif onlyheads is None and not other.capable('changegroupsubset'): | ||||
# compat with older servers when pulling all remote heads | # compat with older servers when pulling all remote heads |