Patchwork [evolve-ext] evolve: use 3.2+ fullreposet to evaluate argument set (issue4515)

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 28, 2015, 3:39 a.m.
Message ID <f7a4c368b207e94aeeb2.1425094779@mimosa>
Download mbox | patch
Permalink /patch/7858/
State Accepted
Headers show

Comments

Yuya Nishihara - Feb. 28, 2015, 3:39 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1422539623 -32400
#      Thu Jan 29 22:53:43 2015 +0900
# Branch stable
# Node ID f7a4c368b207e94aeeb272ecdd322a6b0e2152b7
# Parent  47f3bdbe0d9c77f7580ca62bfd453e870e3ba325
evolve: use 3.2+ fullreposet to evaluate argument set (issue4515)

getset() has no compatibility wrapper for old-style argument and we don't
want to add more hacks in Mercurial core.
Pierre-Yves David - March 2, 2015, 8:26 p.m.
On 02/28/2015 03:39 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1422539623 -32400
> #      Thu Jan 29 22:53:43 2015 +0900
> # Branch stable
> # Node ID f7a4c368b207e94aeeb272ecdd322a6b0e2152b7
> # Parent  47f3bdbe0d9c77f7580ca62bfd453e870e3ba325
> evolve: use 3.2+ fullreposet to evaluate argument set (issue4515)

Sure, pushed to main.

Many thanks

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -502,7 +502,7 @@  def revsetprecursors(repo, subset, x):
     """``precursors(set)``
     Immediate precursors of changesets in set.
     """
-    s = revset.getset(repo, range(len(repo)), x)
+    s = revset.getset(repo, revset.fullreposet(repo), x)
     cs = _precursors(repo, s)
     return [r for r in subset if r in cs]
 
@@ -512,7 +512,7 @@  def revsetallprecursors(repo, subset, x)
     """``allprecursors(set)``
     Transitive precursors of changesets in set.
     """
-    s = revset.getset(repo, range(len(repo)), x)
+    s = revset.getset(repo, revset.fullreposet(repo), x)
     cs = _allprecursors(repo, s)
     return [r for r in subset if r in cs]
 
@@ -522,7 +522,7 @@  def revsetsuccessors(repo, subset, x):
     """``successors(set)``
     Immediate successors of changesets in set.
     """
-    s = revset.getset(repo, range(len(repo)), x)
+    s = revset.getset(repo, revset.fullreposet(repo), x)
     cs = _successors(repo, s)
     return [r for r in subset if r in cs]
 
@@ -531,7 +531,7 @@  def revsetallsuccessors(repo, subset, x)
     """``allsuccessors(set)``
     Transitive successors of changesets in set.
     """
-    s = revset.getset(repo, range(len(repo)), x)
+    s = revset.getset(repo, revset.fullreposet(repo), x)
     cs = _allsuccessors(repo, s)
     return [r for r in subset if r in cs]