changeset 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 b87e4638dabf
children 1e8e0b01faba
files mercurial/bundlerepo.py
diffstat 1 files changed, 15 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Thu Oct 08 01:40:21 2015 -0700
+++ b/mercurial/bundlerepo.py	Mon Oct 05 00:18:11 2015 -0700
@@ -455,19 +455,21 @@
     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