obsdiscovery: directly use the 'only' revset for obshashtree
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 30 May 2017 14:27:26 +0200
changeset 2513 333de672c7f0
parent 2512 0e6ae8db9c21
child 2514 b9f03002f214
obsdiscovery: directly use the 'only' revset for obshashtree The revset now exists and is fast. This remove the needs to hold a reference to "revs" in that code.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Tue May 30 14:21:10 2017 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Tue May 30 14:27:26 2017 +0200
@@ -877,7 +877,7 @@
         else:
             common = findcommonobsmarkers(pushop.ui, unfi, pushop.remote,
                                           commonrevs)
-            revs = list(unfi.revs('%ld - (::%ln)', revs, common))
+            revs = list(unfi.revs('only(%ln, %ln)', pushop.futureheads, common))
             nodes = [cl.node(r) for r in revs]
 
         if nodes: