[PATCH 3 of 3] revset: minor changes adding baseset to revsets

Lucas Moscovicz lmoscovicz at fb.com
Thu Feb 6 20:55:15 CST 2014


# HG changeset patch
# User Lucas Moscovicz <lmoscovicz at fb.com>
# Date 1391727445 28800
#      Thu Feb 06 14:57:25 2014 -0800
# Node ID 37e4e824e90660b10227714663b5cd8a69f307ca
# Parent  3ab8d986e51808fc3e56e63125a6a38a9d0d2418
revset: minor changes adding baseset to revsets

Changed bits of code to work with baseset implementations.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -249,7 +249,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)
@@ -330,12 +330,11 @@
         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)
-    s = subset.set()
-    return baseset([r for r in s if r in ps])
+    return baseset([r for r in subset if r in ps])
 
 def author(repo, subset, x):
     """``author(string)``


More information about the Mercurial-devel mailing list