[PATCH 4 of 4] revset: changed getset so that it can return a lazyset
Lucas Moscovicz
lmoscovicz at fb.com
Tue Feb 11 00:49:52 UTC 2014
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz at fb.com>
# Date 1390951154 28800
# Tue Jan 28 15:19:14 2014 -0800
# Node ID 55a68ea5907fe7b3f45ea44e87818b03fa9553d7
# Parent ecb4171110b4f2a9df166ec4a3087ded6577f857
revset: changed getset so that it can return a lazyset
Tested manually on getset if the return type is a lazyset to let it pass
instead of converting it to a baseset. This is temporal until everything is
implemented to work with lazysets and there is no need to convert it back to a
baseset.
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -195,7 +195,10 @@
def getset(repo, subset, x):
if not x:
raise error.ParseError(_("missing argument"))
- return baseset(methods[x[0]](repo, subset, *x[1:]))
+ s = methods[x[0]](repo, subset, *x[1:])
+ if isinstance(s, lazyset):
+ return s
+ return baseset(s)
def _getrevsource(repo, r):
extra = repo[r].extra()
More information about the Mercurial-devel
mailing list