outgoing: pre-indent some code stable
authorFelipe Resende <felipe@fcresende.dev.br>
Fri, 25 Oct 2024 01:14:53 +0200
branchstable
changeset 52085 653b7a19f1de
parent 52084 75123bc60b66
child 52086 fb15ba66c702
outgoing: pre-indent some code This will make the next changeset clearer.
mercurial/hg.py
--- a/mercurial/hg.py	Fri Oct 25 01:23:24 2024 +0200
+++ b/mercurial/hg.py	Fri Oct 25 01:14:53 2024 +0200
@@ -1495,38 +1495,43 @@
     others = []
     for path in urlutil.get_push_paths(repo, ui, dests):
         dest = path.loc
-        if subpath is not None:
-            subpath = urlutil.url(subpath)
-            if subpath.isabs():
-                dest = bytes(subpath)
-            else:
-                p = urlutil.url(dest)
-                if p.islocal():
-                    normpath = os.path.normpath
+        if True:
+            if subpath is not None:
+                subpath = urlutil.url(subpath)
+                if subpath.isabs():
+                    dest = bytes(subpath)
                 else:
-                    normpath = posixpath.normpath
-                p.path = normpath(b'%s/%s' % (p.path, subpath))
-                dest = bytes(p)
-        branches = path.branch, opts.get(b'branch') or []
+                    p = urlutil.url(dest)
+                    if p.islocal():
+                        normpath = os.path.normpath
+                    else:
+                        normpath = posixpath.normpath
+                    p.path = normpath(b'%s/%s' % (p.path, subpath))
+                    dest = bytes(p)
+            branches = path.branch, opts.get(b'branch') or []
 
-        ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
-        revs, checkout = addbranchrevs(repo, repo, branches, opts.get(b'rev'))
-        if revs:
-            revs = [repo[rev].node() for rev in logcmdutil.revrange(repo, revs)]
+            ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
+            revs, checkout = addbranchrevs(
+                repo, repo, branches, opts.get(b'rev')
+            )
+            if revs:
+                revs = [
+                    repo[rev].node() for rev in logcmdutil.revrange(repo, revs)
+                ]
 
-        other = peer(repo, opts, dest)
-        try:
-            outgoing = discovery.findcommonoutgoing(
-                repo, other, revs, force=opts.get(b'force')
-            )
-            o = outgoing.missing
-            out.update(o)
-            if not o:
-                scmutil.nochangesfound(repo.ui, repo, outgoing.excluded)
-            others.append(other)
-        except:  # re-raises
-            other.close()
-            raise
+            other = peer(repo, opts, dest)
+            try:
+                outgoing = discovery.findcommonoutgoing(
+                    repo, other, revs, force=opts.get(b'force')
+                )
+                o = outgoing.missing
+                out.update(o)
+                if not o:
+                    scmutil.nochangesfound(repo.ui, repo, outgoing.excluded)
+                others.append(other)
+            except:  # re-raises
+                other.close()
+                raise
     return list(out), others