Show More
@@ -1202,7 +1202,8 b' def last(repo, subset, x):' | |||
|
1202 | 1202 | break |
|
1203 | 1203 | elif y in subset: |
|
1204 | 1204 | result.append(y) |
|
1205 |
return baseset(result, datarepr=('<last n=%d, %r, %r>', |
|
|
1205 | return baseset(result[::-1], datarepr=('<last n=%d, %r, %r>', | |
|
1206 | lim, subset, os)) | |
|
1206 | 1207 | |
|
1207 | 1208 | @predicate('max(set)', safe=True) |
|
1208 | 1209 | def maxrev(repo, subset, x): |
@@ -986,6 +986,9 b' test ancestors' | |||
|
986 | 986 | $ log 'keyword(issue)' |
|
987 | 987 | 6 |
|
988 | 988 | $ log 'keyword("test a")' |
|
989 | ||
|
990 | Test first (=limit) and last | |
|
991 | ||
|
989 | 992 | $ log 'limit(head(), 1)' |
|
990 | 993 | 0 |
|
991 | 994 | $ log 'limit(author("re:bob|test"), 3, 5)' |
@@ -998,6 +1001,16 b' test ancestors' | |||
|
998 | 1001 | $ log 'limit(all(), 1, -1)' |
|
999 | 1002 | hg: parse error: negative offset |
|
1000 | 1003 | [255] |
|
1004 | ||
|
1005 | $ log 'last(all(), 0)' | |
|
1006 | $ log 'last(all(), 1)' | |
|
1007 | 9 | |
|
1008 | $ log 'last(all(), 2)' | |
|
1009 | 8 | |
|
1010 | 9 | |
|
1011 | ||
|
1012 | Test matching | |
|
1013 | ||
|
1001 | 1014 | $ log 'matching(6)' |
|
1002 | 1015 | 6 |
|
1003 | 1016 | $ log 'matching(6:7, "phase parents user date branch summary files description substate")' |
General Comments 0
You need to be logged in to leave comments.
Login now