changeset 2511:4c0b10d73f5f

obsdiscovery: merge two distinct if statement It did not made any sense for them to be split.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 30 May 2017 14:09:06 +0200
parents b99b83728ea3
children 0e6ae8db9c21
files hgext3rd/evolve/obsdiscovery.py
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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"