Show More
@@ -250,7 +250,11 b' def ancestors(repo, subset, x):' | |||
|
250 | 250 | """Changesets that are ancestors of changesets in set, including the |
|
251 | 251 | given changesets themselves. |
|
252 | 252 | """ |
|
253 | return _ancestors(repo, subset, x) | |
|
253 | args = getargsdict(x, 'ancestors', 'set') | |
|
254 | if 'set' not in args: | |
|
255 | # i18n: "ancestors" is a keyword | |
|
256 | raise error.ParseError(_('ancestors takes at least 1 argument')) | |
|
257 | return _ancestors(repo, subset, args['set']) | |
|
254 | 258 | |
|
255 | 259 | @predicate('_firstancestors', safe=True) |
|
256 | 260 | def _firstancestors(repo, subset, x): |
@@ -596,7 +600,11 b' def descendants(repo, subset, x):' | |||
|
596 | 600 | """Changesets which are descendants of changesets in set, including the |
|
597 | 601 | given changesets themselves. |
|
598 | 602 | """ |
|
599 | return _descendants(repo, subset, x) | |
|
603 | args = getargsdict(x, 'descendants', 'set') | |
|
604 | if 'set' not in args: | |
|
605 | # i18n: "descendants" is a keyword | |
|
606 | raise error.ParseError(_('descendants takes at least 1 argument')) | |
|
607 | return _descendants(repo, subset, args['set']) | |
|
600 | 608 | |
|
601 | 609 | @predicate('_firstdescendants', safe=True) |
|
602 | 610 | def _firstdescendants(repo, subset, x): |
@@ -2996,8 +2996,7 b' optimization to only() works only if anc' | |||
|
2996 | 2996 | ('symbol', '1')) |
|
2997 | 2997 | any) |
|
2998 | 2998 | define) |
|
2999 | hg: parse error: can't use a list in this context | |
|
3000 | (see hg help "revsets.x or y") | |
|
2999 | hg: parse error: ancestors takes at most 1 positional arguments | |
|
3001 | 3000 | [255] |
|
3002 | 3001 | $ hg debugrevspec -p optimized 'ancestors(6, 1) - ancestors(4)' |
|
3003 | 3002 | * optimized: |
@@ -3013,8 +3012,7 b' optimization to only() works only if anc' | |||
|
3013 | 3012 | ('symbol', '4') |
|
3014 | 3013 | any) |
|
3015 | 3014 | define) |
|
3016 | hg: parse error: can't use a list in this context | |
|
3017 | (see hg help "revsets.x or y") | |
|
3015 | hg: parse error: ancestors takes at most 1 positional arguments | |
|
3018 | 3016 | [255] |
|
3019 | 3017 | |
|
3020 | 3018 | optimization disabled if keyword arguments passed (because we're too lazy |
@@ -3036,8 +3034,9 b' to support it)' | |||
|
3036 | 3034 | ('symbol', '4')) |
|
3037 | 3035 | any) |
|
3038 | 3036 | define) |
|
3039 | hg: parse error: can't use a key-value pair in this context | |
|
3040 |
|
|
|
3037 | 3 | |
|
3038 | 5 | |
|
3039 | 6 | |
|
3041 | 3040 | |
|
3042 | 3041 | invalid function call should not be optimized to only() |
|
3043 | 3042 |
General Comments 0
You need to be logged in to leave comments.
Login now