changeset 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
files mercurial/cmdutil.py mercurial/commands.py
diffstat 2 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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