hgext/churn.py
changeset 9662 f3d60543924f
parent 9655 6d7d3f849062
child 9665 1de5ebfa5585
--- a/hgext/churn.py	Wed Oct 28 23:59:18 2009 +0900
+++ b/hgext/churn.py	Thu Oct 29 17:07:51 2009 -0500
@@ -54,13 +54,10 @@
         df = util.matchdate(opts['date'])
 
     m = cmdutil.match(repo, pats, opts)
-    for st, ctx, fns in cmdutil.walkchangerevs(ui, repo, m, opts):
-        if not st == 'add':
-            continue
-
+    def prep(ctx, fns):
         rev = ctx.rev()
         if df and not df(ctx.date()[0]): # doesn't match date format
-            continue
+            return
 
         key = getkey(ctx)
         key = amap.get(key, key) # alias remap
@@ -70,7 +67,7 @@
             parents = ctx.parents()
             if len(parents) > 1:
                 ui.note(_('Revision %d is a merge, ignoring...\n') % (rev,))
-                continue
+                return
 
             ctx1 = parents[0]
             lines = changedlines(ui, repo, ctx1, ctx, fns)
@@ -84,6 +81,9 @@
                 ui.write("\r" + _("generating stats: %d%%") % pct)
                 sys.stdout.flush()
 
+    for ctx in cmdutil.walkchangerevs(ui, repo, m, opts, prep):
+        continue
+
     if opts.get('progress'):
         ui.write("\r")
         sys.stdout.flush()