# HG changeset patch # User Pierre-Yves David # Date 2015-10-05 07:18:11 # Node ID a018cbabdb51f5a1cdb200d676c681e8eefd8522 # Parent b87e4638dabfab04c6b7c82467bce026dde1629e 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. diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -455,19 +455,21 @@ def getremotechanges(ui, repo, other, on if bundlename or not localrepo: # create a bundle (uncompressed if other repo is not local) - if other.capable('getbundle'): - cg = other.getbundle('incoming', common=common, heads=rheads) - elif onlyheads is None and not other.capable('changegroupsubset'): - # compat with older servers when pulling all remote heads - cg = other.changegroup(incoming, "incoming") - rheads = None - else: - cg = other.changegroupsubset(incoming, rheads, 'incoming') - if localrepo: - bundletype = "HG10BZ" - else: - bundletype = "HG10UN" - fname = bundle = changegroup.writebundle(ui, cg, bundlename, bundletype) + if True: + if other.capable('getbundle'): + cg = other.getbundle('incoming', common=common, heads=rheads) + elif onlyheads is None and not other.capable('changegroupsubset'): + # compat with older servers when pulling all remote heads + cg = other.changegroup(incoming, "incoming") + rheads = None + else: + cg = other.changegroupsubset(incoming, rheads, 'incoming') + if localrepo: + bundletype = "HG10BZ" + else: + bundletype = "HG10UN" + fname = bundle = changegroup.writebundle(ui, cg, bundlename, + bundletype) # keep written bundle? if bundlename: bundle = None