Patchwork revset: stop using a baseset instead of a plain list in _revsbetween

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 18, 2014, 10:31 p.m.
Message ID <87b2ff58de3039b36d60.1411079468@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5878/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 18, 2014, 10:31 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1410933349 25200
#      Tue Sep 16 22:55:49 2014 -0700
# Node ID 87b2ff58de3039b36d60cf76599290f55254baed
# Parent  fe9a4c6649ec5c035c41f563cddfae8e75b31843
revset: stop using a baseset instead of a plain list in _revsbetween

The function internal code needs a list. Lets use a list.
Durham Goode - Sept. 19, 2014, 5:47 p.m.
On 9/18/14, 3:31 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1410933349 25200
> #      Tue Sep 16 22:55:49 2014 -0700
> # Node ID 87b2ff58de3039b36d60cf76599290f55254baed
> # Parent  fe9a4c6649ec5c035c41f563cddfae8e75b31843
> revset: stop using a baseset instead of a plain list in _revsbetween
>
> The function internal code needs a list. Lets use a list.
>
Queued to the clowncopter repo.

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -76,11 +76,11 @@  def _revsbetween(repo, roots, heads):
     """Return all paths between roots and heads, inclusive of both endpoint
     sets."""
     if not roots:
         return baseset([])
     parentrevs = repo.changelog.parentrevs
-    visit = baseset(heads)
+    visit = list(heads)
     reachable = set()
     seen = {}
     minroot = min(roots)
     roots = set(roots)
     # open-code the post-order traversal due to the tiny size of