Patchwork revset: minor changes adding baseset to revsets

login
register
mail settings
Submitter Lucas Moscovicz
Date Feb. 10, 2014, 5:04 p.m.
Message ID <3925ccf169223cfde890.1392051854@dev1037.prn2.facebook.com>
Download mbox | patch
Permalink /patch/3542/
State Accepted
Commit 1da346bad3d8e79ee346bde9abb5cb6ea5d3ed1f
Headers show

Comments

Lucas Moscovicz - Feb. 10, 2014, 5:04 p.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1391727445 28800
#      Thu Feb 06 14:57:25 2014 -0800
# Node ID 3925ccf169223cfde890c83d5429f3f533f07214
# Parent  c491d77ac81a96cce64b67c13d381cb01093984b
revset: minor changes adding baseset to revsets

Changed bits of code to work with baseset implementations.
Matt Mackall - Feb. 10, 2014, 10:37 p.m.
On Mon, 2014-02-10 at 09:04 -0800, Lucas Moscovicz wrote:
> # HG changeset patch
> # User Lucas Moscovicz <lmoscovicz@fb.com>
> # Date 1391727445 28800
> #      Thu Feb 06 14:57:25 2014 -0800
> # Node ID 3925ccf169223cfde890c83d5429f3f533f07214
> # Parent  c491d77ac81a96cce64b67c13d381cb01093984b
> revset: minor changes adding baseset to revsets

Queued for default, thanks.

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -250,7 +250,7 @@ 
 def orset(repo, subset, x, y):
     xl = getset(repo, subset, x)
     yl = getset(repo, subset - xl, y)
-    return baseset(xl + yl)
+    return xl + yl
 
 def notset(repo, subset, x):
     return subset - getset(repo, subset, x)
@@ -334,7 +334,7 @@ 
         raise error.ParseError(_("~ expects a number"))
     ps = set()
     cl = repo.changelog
-    for r in getset(repo, cl, x):
+    for r in getset(repo, baseset(cl), x):
         for i in range(n):
             r = cl.parentrevs(r)[0]
         ps.add(r)