obsdiscovery: merge two distinct if statement
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 30 May 2017 14:09:06 +0200
changeset 2511 4c0b10d73f5f
parent 2510 b99b83728ea3
child 2512 0e6ae8db9c21
obsdiscovery: merge two distinct if statement It did not made any sense for them to be split.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Tue May 30 12:32:14 2017 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Tue May 30 14:09:06 2017 +0200
@@ -869,17 +869,15 @@
         if _canobshashrange(repo, pushop.remote):
             missing = findmissingrange(pushop.ui, unfi, pushop.remote,
                                        commonrevs)
-        else:
-            common = findcommonobsmarkers(pushop.ui, unfi, pushop.remote,
-                                          commonrevs)
-        if missing is None:
-            revs = list(unfi.revs('%ld - (::%ln)', revs, common))
-            nodes = [cl.node(r) for r in revs]
-        else:
             revs = list(repo.revs('only(%ln, %ln)', pushop.futureheads,
                         pushop.outgoing.commonheads))
             nodes = [cl.node(r) for r in revs]
             nodes += missing
+        else:
+            common = findcommonobsmarkers(pushop.ui, unfi, pushop.remote,
+                                          commonrevs)
+            revs = list(unfi.revs('%ld - (::%ln)', revs, common))
+            nodes = [cl.node(r) for r in revs]
 
         if nodes:
             obsexcmsg(repo.ui, "computing markers relevant to %i nodes\n"