Show More
@@ -490,6 +490,7 b' def showrevslist(name, revs, **args):' | |||||
490 | """helper to generate a list of revisions in which a mapped template will |
|
490 | """helper to generate a list of revisions in which a mapped template will | |
491 | be evaluated""" |
|
491 | be evaluated""" | |
492 | repo = args['ctx'].repo() |
|
492 | repo = args['ctx'].repo() | |
|
493 | revs = [str(r) for r in revs] # ifcontains() needs a list of str | |||
493 | f = _showlist(name, revs, **args) |
|
494 | f = _showlist(name, revs, **args) | |
494 | return _hybrid(f, revs, |
|
495 | return _hybrid(f, revs, | |
495 | lambda x: {name: x, 'ctx': repo[int(x)], 'revcache': {}}) |
|
496 | lambda x: {name: x, 'ctx': repo[int(x)], 'revcache': {}}) |
@@ -581,14 +581,14 b' def revset(context, mapping, args):' | |||||
581 | if len(args) > 1: |
|
581 | if len(args) > 1: | |
582 | formatargs = list([a[0](context, mapping, a[1]) for a in args[1:]]) |
|
582 | formatargs = list([a[0](context, mapping, a[1]) for a in args[1:]]) | |
583 | revs = query(revsetmod.formatspec(raw, *formatargs)) |
|
583 | revs = query(revsetmod.formatspec(raw, *formatargs)) | |
584 |
revs = list( |
|
584 | revs = list(revs) | |
585 | else: |
|
585 | else: | |
586 | revsetcache = mapping['cache'].setdefault("revsetcache", {}) |
|
586 | revsetcache = mapping['cache'].setdefault("revsetcache", {}) | |
587 | if raw in revsetcache: |
|
587 | if raw in revsetcache: | |
588 | revs = revsetcache[raw] |
|
588 | revs = revsetcache[raw] | |
589 | else: |
|
589 | else: | |
590 | revs = query(raw) |
|
590 | revs = query(raw) | |
591 |
revs = list( |
|
591 | revs = list(revs) | |
592 | revsetcache[raw] = revs |
|
592 | revsetcache[raw] = revs | |
593 |
|
593 | |||
594 | return templatekw.showrevslist("revision", revs, **mapping) |
|
594 | return templatekw.showrevslist("revision", revs, **mapping) |
General Comments 0
You need to be logged in to leave comments.
Login now