exchange: trivial simplification
authorFelipe Contreras <felipe.contreras@gmail.com>
Fri, 05 May 2023 06:08:36 -0600
changeset 51797 2f8e7e384178
parent 51788 9af1acc1ffab
child 51799 1888846a1ee2
exchange: trivial simplification Both sides of the condition do essentially the same thing, except one with fastpath=True. No functional changes.
mercurial/exchange.py
--- a/mercurial/exchange.py	Mon Aug 05 20:08:23 2024 +0200
+++ b/mercurial/exchange.py	Fri May 05 06:08:36 2023 -0600
@@ -1278,18 +1278,18 @@
     ):
         # push everything,
         # use the fast path, no race possible on push
-        cg = changegroup.makechangegroup(
-            pushop.repo,
-            outgoing,
-            b'01',
-            b'push',
-            fastpath=True,
-            bundlecaps=bundlecaps,
-        )
+        fastpath = True
     else:
-        cg = changegroup.makechangegroup(
-            pushop.repo, outgoing, b'01', b'push', bundlecaps=bundlecaps
-        )
+        fastpath = False
+
+    cg = changegroup.makechangegroup(
+        pushop.repo,
+        outgoing,
+        b'01',
+        b'push',
+        fastpath=fastpath,
+        bundlecaps=bundlecaps,
+    )
 
     # apply changegroup to remote
     # local repo finds heads on server, finds out what