--- a/mercurial/localrepo.py Tue Nov 01 16:49:30 2011 -0500
+++ b/mercurial/localrepo.py Wed Nov 02 13:37:34 2011 -0500
@@ -220,15 +220,18 @@
for i in xrange(len(self)):
yield i
+ def revs(self, expr, *args):
+ '''Return a list of revisions matching the given revset'''
+ expr = revset.formatspec(expr, *args)
+ m = revset.match(None, expr)
+ return [r for r in m(self, range(len(self)))]
+
def set(self, expr, *args):
'''
Yield a context for each matching revision, after doing arg
replacement via revset.formatspec
'''
-
- expr = revset.formatspec(expr, *args)
- m = revset.match(None, expr)
- for r in m(self, range(len(self))):
+ for r in self.revs(expr, *args):
yield self[r]
def url(self):