Show More
@@ -972,8 +972,18 b' def last(repo, subset, x):' | |||||
972 | # i18n: "last" is a keyword |
|
972 | # i18n: "last" is a keyword | |
973 | raise error.ParseError(_("last expects a number")) |
|
973 | raise error.ParseError(_("last expects a number")) | |
974 | ss = subset.set() |
|
974 | ss = subset.set() | |
975 |
os = getset(repo, spanset(repo), l[0]) |
|
975 | os = getset(repo, spanset(repo), l[0]) | |
976 | return baseset([r for r in os if r in ss]) |
|
976 | os.reverse() | |
|
977 | bs = baseset([]) | |||
|
978 | it = iter(os) | |||
|
979 | for x in xrange(lim): | |||
|
980 | try: | |||
|
981 | y = it.next() | |||
|
982 | if y in ss: | |||
|
983 | bs.append(y) | |||
|
984 | except (StopIteration): | |||
|
985 | break | |||
|
986 | return bs | |||
977 |
|
987 | |||
978 | def maxrev(repo, subset, x): |
|
988 | def maxrev(repo, subset, x): | |
979 | """``max(set)`` |
|
989 | """``max(set)`` |
General Comments 0
You need to be logged in to leave comments.
Login now