--- a/mercurial/revset.py Fri Sep 16 22:57:47 2011 -0500
+++ b/mercurial/revset.py Sat Sep 17 12:34:47 2011 -0500
@@ -407,6 +407,12 @@
return [r for r in subset if r in s]
+def first(repo, subset, x):
+ """``first(set, [n])``
+ An alias for limit().
+ """
+ return limit(repo, subset, x)
+
def follow(repo, subset, x):
"""``follow([file])``
An alias for ``::.`` (ancestors of the working copy's first parent).
@@ -842,6 +848,7 @@
"descendants": descendants,
"file": hasfile,
"filelog": filelog,
+ "first": first,
"follow": follow,
"grep": grep,
"head": head,
@@ -955,7 +962,7 @@
w = 100 # very slow
elif f == "ancestor":
w = 1 * smallbonus
- elif f in "reverse limit":
+ elif f in "reverse limit first":
w = 0
elif f in "sort":
w = 10 # assume most sorts look at changelog