comparison mercurial/cmdutil.py @ 24063:c98fa0ca4678

cmdutil: have walkchangerevs utilize common function to build revs
author Yuya Nishihara <yuya@tcha.org>
date Fri, 06 Feb 2015 00:22:20 +0900
parents f576addb5b77
children c260887cdbcd
comparison
equal deleted inserted replaced
24062:f576addb5b77 24063:c98fa0ca4678
1471 This function returns an iterator yielding contexts. Before 1471 This function returns an iterator yielding contexts. Before
1472 yielding each context, the iterator will first call the prepare 1472 yielding each context, the iterator will first call the prepare
1473 function on each context in the window in forward order.''' 1473 function on each context in the window in forward order.'''
1474 1474
1475 follow = opts.get('follow') or opts.get('follow_first') 1475 follow = opts.get('follow') or opts.get('follow_first')
1476 1476 revs = _logrevs(repo, opts)
1477 if opts.get('rev'):
1478 revs = scmutil.revrange(repo, opts.get('rev'))
1479 elif follow:
1480 revs = repo.revs('reverse(:.)')
1481 else:
1482 revs = revset.spanset(repo)
1483 revs.reverse()
1484 if not revs: 1477 if not revs:
1485 return [] 1478 return []
1486 wanted = set() 1479 wanted = set()
1487 slowpath = match.anypats() or (match.files() and opts.get('removed')) 1480 slowpath = match.anypats() or (match.files() and opts.get('removed'))
1488 fncache = {} 1481 fncache = {}