# HG changeset patch # User Matt Mackall # Date 1256514238 18000 # Node ID e4de75343743f8ea3355b862d476ae2dadaf8100 # Parent 2cb0cab10d2e8cdf814df9cf6fb807e5a28b413c walkchangerevs: kill window step of iterator diff -r 2cb0cab10d2e -r e4de75343743 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sun Oct 25 18:43:56 2009 -0500 +++ b/mercurial/cmdutil.py Sun Oct 25 18:43:58 2009 -0500 @@ -1053,10 +1053,6 @@ This function returns an iterator. The iterator yields 3-tuples. They will be of one of the following forms: - "window", incrementing, lastrev: stepping through a window, - positive if walking forwards through revs, last rev in the - sequence iterated over - use to reset state for the current window - "add", rev, fns: out-of-order traversal of the given filenames fns, which changed during revision rev - use to gather data for possible display @@ -1218,7 +1214,6 @@ return rev in wanted for i, window in increasing_windows(0, len(revs)): - yield 'window', revs[0] < revs[-1], revs[-1] nrevs = [rev for rev in revs[i:i+window] if want(rev)] for rev in sorted(nrevs): fns = fncache.get(rev) diff -r 2cb0cab10d2e -r e4de75343743 mercurial/commands.py --- a/mercurial/commands.py Sun Oct 25 18:43:56 2009 -0500 +++ b/mercurial/commands.py Sun Oct 25 18:43:58 2009 -0500 @@ -1293,10 +1293,7 @@ found = False follow = opts.get('follow') for st, rev, fns in cmdutil.walkchangerevs(ui, repo, matchfn, get, opts): - if st == 'window': - matches.clear() - revfiles.clear() - elif st == 'add': + if st == 'add': ctx = get(rev) pctx = ctx.parents()[0] parent = pctx.rev() @@ -1347,6 +1344,8 @@ skip[fn] = True if copy: skip[copy] = True + del matches[rev] + del revfiles[rev] def heads(ui, repo, *branchrevs, **opts): """show current repository heads or show branch heads