Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templater.py @ 28178:96f2d50fb9f6
templater: factor out type conversion of revset() result
This makes it clear why we have to do repo[int(x)].
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 12 Feb 2016 18:39:48 +0900 |
parents | cfe7da66f555 |
children | 5c11702fe2a3 |
line wrap: on
line diff
--- a/mercurial/templater.py Fri Feb 12 18:08:53 2016 +0900 +++ b/mercurial/templater.py Fri Feb 12 18:39:48 2016 +0900 @@ -581,14 +581,14 @@ if len(args) > 1: formatargs = list([a[0](context, mapping, a[1]) for a in args[1:]]) revs = query(revsetmod.formatspec(raw, *formatargs)) - revs = list([str(r) for r in revs]) + revs = list(revs) else: revsetcache = mapping['cache'].setdefault("revsetcache", {}) if raw in revsetcache: revs = revsetcache[raw] else: revs = query(raw) - revs = list([str(r) for r in revs]) + revs = list(revs) revsetcache[raw] = revs return templatekw.showrevslist("revision", revs, **mapping)