# HG changeset patch # User Pierre-Yves David # Date 1496146146 -7200 # Node ID 4c0b10d73f5fa51f5d73a8a7261ba05ecd6bd24e # Parent b99b83728ea38254413bc259beb93cb3ed28e48a obsdiscovery: merge two distinct if statement It did not made any sense for them to be split. diff -r b99b83728ea3 -r 4c0b10d73f5f 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"