comparison mercurial/bundlerepo.py @ 26543:a018cbabdb51

bundlerepo: indent some code to prepare next patch We are about to add a new condition. Code is indented in a separated patch for readability.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 05 Oct 2015 00:18:11 -0700
parents 1f0e78f8f55f
children 1e8e0b01faba
comparison
equal deleted inserted replaced
26542:b87e4638dabf 26543:a018cbabdb51
453 bundlerepo = None 453 bundlerepo = None
454 localrepo = other.local() 454 localrepo = other.local()
455 if bundlename or not localrepo: 455 if bundlename or not localrepo:
456 # create a bundle (uncompressed if other repo is not local) 456 # create a bundle (uncompressed if other repo is not local)
457 457
458 if other.capable('getbundle'): 458 if True:
459 cg = other.getbundle('incoming', common=common, heads=rheads) 459 if other.capable('getbundle'):
460 elif onlyheads is None and not other.capable('changegroupsubset'): 460 cg = other.getbundle('incoming', common=common, heads=rheads)
461 # compat with older servers when pulling all remote heads 461 elif onlyheads is None and not other.capable('changegroupsubset'):
462 cg = other.changegroup(incoming, "incoming") 462 # compat with older servers when pulling all remote heads
463 rheads = None 463 cg = other.changegroup(incoming, "incoming")
464 else: 464 rheads = None
465 cg = other.changegroupsubset(incoming, rheads, 'incoming') 465 else:
466 if localrepo: 466 cg = other.changegroupsubset(incoming, rheads, 'incoming')
467 bundletype = "HG10BZ" 467 if localrepo:
468 else: 468 bundletype = "HG10BZ"
469 bundletype = "HG10UN" 469 else:
470 fname = bundle = changegroup.writebundle(ui, cg, bundlename, bundletype) 470 bundletype = "HG10UN"
471 fname = bundle = changegroup.writebundle(ui, cg, bundlename,
472 bundletype)
471 # keep written bundle? 473 # keep written bundle?
472 if bundlename: 474 if bundlename:
473 bundle = None 475 bundle = None
474 if not localrepo: 476 if not localrepo:
475 # use the created uncompressed bundlerepo 477 # use the created uncompressed bundlerepo