comparison mercurial/commands.py @ 9653:e4de75343743

walkchangerevs: kill window step of iterator
author Matt Mackall <mpm@selenic.com>
date Sun, 25 Oct 2009 18:43:58 -0500
parents 2cb0cab10d2e
children 96fe91be9c1e
comparison
equal deleted inserted replaced
9652:2cb0cab10d2e 9653:e4de75343743
1291 get = util.cachefunc(lambda r: repo[r]) 1291 get = util.cachefunc(lambda r: repo[r])
1292 matchfn = cmdutil.match(repo, pats, opts) 1292 matchfn = cmdutil.match(repo, pats, opts)
1293 found = False 1293 found = False
1294 follow = opts.get('follow') 1294 follow = opts.get('follow')
1295 for st, rev, fns in cmdutil.walkchangerevs(ui, repo, matchfn, get, opts): 1295 for st, rev, fns in cmdutil.walkchangerevs(ui, repo, matchfn, get, opts):
1296 if st == 'window': 1296 if st == 'add':
1297 matches.clear()
1298 revfiles.clear()
1299 elif st == 'add':
1300 ctx = get(rev) 1297 ctx = get(rev)
1301 pctx = ctx.parents()[0] 1298 pctx = ctx.parents()[0]
1302 parent = pctx.rev() 1299 parent = pctx.rev()
1303 matches.setdefault(rev, {}) 1300 matches.setdefault(rev, {})
1304 matches.setdefault(parent, {}) 1301 matches.setdefault(parent, {})
1345 found = found or r 1342 found = found or r
1346 if r and not opts.get('all'): 1343 if r and not opts.get('all'):
1347 skip[fn] = True 1344 skip[fn] = True
1348 if copy: 1345 if copy:
1349 skip[copy] = True 1346 skip[copy] = True
1347 del matches[rev]
1348 del revfiles[rev]
1350 1349
1351 def heads(ui, repo, *branchrevs, **opts): 1350 def heads(ui, repo, *branchrevs, **opts):
1352 """show current repository heads or show branch heads 1351 """show current repository heads or show branch heads
1353 1352
1354 With no arguments, show all repository head changesets. 1353 With no arguments, show all repository head changesets.