changeset 9665:1de5ebfa5585

walkchangerevs: drop ui arg
author Matt Mackall <mpm@selenic.com>
date Thu, 29 Oct 2009 19:03:16 -0500
parents 2a4a0dc4fb85
children 8743f2e1bc54
files hgext/churn.py mercurial/cmdutil.py mercurial/commands.py
diffstat 3 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/churn.py	Thu Oct 29 19:03:13 2009 -0500
+++ b/hgext/churn.py	Thu Oct 29 19:03:16 2009 -0500
@@ -81,7 +81,7 @@
                 ui.write("\r" + _("generating stats: %d%%") % pct)
                 sys.stdout.flush()
 
-    for ctx in cmdutil.walkchangerevs(ui, repo, m, opts, prep):
+    for ctx in cmdutil.walkchangerevs(repo, m, opts, prep):
         continue
 
     if opts.get('progress'):
--- a/mercurial/cmdutil.py	Thu Oct 29 19:03:13 2009 -0500
+++ b/mercurial/cmdutil.py	Thu Oct 29 19:03:16 2009 -0500
@@ -1031,7 +1031,7 @@
         if df(d[0]):
             results[rev] = d
 
-    for ctx in walkchangerevs(ui, repo, m, {'rev':None}, prep):
+    for ctx in walkchangerevs(repo, m, {'rev':None}, prep):
         rev = ctx.rev()
         if rev in results:
             ui.status(_("Found revision %s from %s\n") %
@@ -1040,7 +1040,7 @@
 
     raise util.Abort(_("revision matching date not found"))
 
-def walkchangerevs(ui, repo, match, opts, prepare):
+def walkchangerevs(repo, match, opts, prepare):
     '''Iterate over files and the revs in which they changed.
 
     Callers most commonly need to iterate backwards over the history
@@ -1088,6 +1088,7 @@
         # No files, no patterns.  Display all revs.
         wanted = set(revs)
     copies = []
+
     if not slowpath:
         # Only files, no patterns.  Check the history of each file.
         def filerevgen(filelog, node):
@@ -1124,8 +1125,6 @@
                     slowpath = True
                     break
                 else:
-                    ui.warn(_('%s:%s copy source revision cannot be found!\n')
-                            % (file_, short(node)))
                     continue
             for rev, copied in filerevgen(filelog, node):
                 if rev <= maxrev:
--- a/mercurial/commands.py	Thu Oct 29 19:03:13 2009 -0500
+++ b/mercurial/commands.py	Thu Oct 29 19:03:16 2009 -0500
@@ -1338,7 +1338,7 @@
                 except error.LookupError:
                     pass
 
-    for ctx in cmdutil.walkchangerevs(ui, repo, matchfn, opts, prep):
+    for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
         rev = ctx.rev()
         parent = ctx.parents()[0].rev()
         for fn in sorted(revfiles.get(rev, [])):
@@ -2068,7 +2068,7 @@
 
         displayer.show(ctx, copies=copies)
 
-    for ctx in cmdutil.walkchangerevs(ui, repo, matchfn, opts, prep):
+    for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
         if count != limit:
             if displayer.flush(ctx.rev()):
                 count += 1