Show More
@@ -1202,7 +1202,8 b' def last(repo, subset, x):' | |||||
1202 | break |
|
1202 | break | |
1203 | elif y in subset: |
|
1203 | elif y in subset: | |
1204 | result.append(y) |
|
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 | @predicate('max(set)', safe=True) |
|
1208 | @predicate('max(set)', safe=True) | |
1208 | def maxrev(repo, subset, x): |
|
1209 | def maxrev(repo, subset, x): |
@@ -986,6 +986,9 b' test ancestors' | |||||
986 | $ log 'keyword(issue)' |
|
986 | $ log 'keyword(issue)' | |
987 | 6 |
|
987 | 6 | |
988 | $ log 'keyword("test a")' |
|
988 | $ log 'keyword("test a")' | |
|
989 | ||||
|
990 | Test first (=limit) and last | |||
|
991 | ||||
989 | $ log 'limit(head(), 1)' |
|
992 | $ log 'limit(head(), 1)' | |
990 | 0 |
|
993 | 0 | |
991 | $ log 'limit(author("re:bob|test"), 3, 5)' |
|
994 | $ log 'limit(author("re:bob|test"), 3, 5)' | |
@@ -998,6 +1001,16 b' test ancestors' | |||||
998 | $ log 'limit(all(), 1, -1)' |
|
1001 | $ log 'limit(all(), 1, -1)' | |
999 | hg: parse error: negative offset |
|
1002 | hg: parse error: negative offset | |
1000 | [255] |
|
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 | $ log 'matching(6)' |
|
1014 | $ log 'matching(6)' | |
1002 | 6 |
|
1015 | 6 | |
1003 | $ log 'matching(6:7, "phase parents user date branch summary files description substate")' |
|
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