comparison mercurial/templater.py @ 24114:fafd9a1284cf

revset: make match function initiate query from full set by default This change is intended to avoid exposing the implementation detail to callers. I'm going to extend fullreposet to support "null" revision, so these mfunc calls will have to use fullreposet() instead of spanset().
author Yuya Nishihara <yuya@tcha.org>
date Mon, 02 Feb 2015 22:21:07 +0900
parents a3c2d9211294
children bd504d90588d
comparison
equal deleted inserted replaced
24113:b08af8f0ac01 24114:fafd9a1284cf
391 ctx = mapping['ctx'] 391 ctx = mapping['ctx']
392 repo = ctx._repo 392 repo = ctx._repo
393 393
394 def query(expr): 394 def query(expr):
395 m = revsetmod.match(repo.ui, expr) 395 m = revsetmod.match(repo.ui, expr)
396 return m(repo, revsetmod.spanset(repo)) 396 return m(repo)
397 397
398 if len(args) > 1: 398 if len(args) > 1:
399 formatargs = list([a[0](context, mapping, a[1]) for a in args[1:]]) 399 formatargs = list([a[0](context, mapping, a[1]) for a in args[1:]])
400 revs = query(revsetmod.formatspec(raw, *formatargs)) 400 revs = query(revsetmod.formatspec(raw, *formatargs))
401 revs = list([str(r) for r in revs]) 401 revs = list([str(r) for r in revs])