##// END OF EJS Templates
walkchangerevs: drop ui arg
Matt Mackall -
r9665:1de5ebfa default
parent child Browse files
Show More
@@ -81,7 +81,7 b' def countrate(ui, repo, amap, *pats, **o'
81 ui.write("\r" + _("generating stats: %d%%") % pct)
81 ui.write("\r" + _("generating stats: %d%%") % pct)
82 sys.stdout.flush()
82 sys.stdout.flush()
83
83
84 for ctx in cmdutil.walkchangerevs(ui, repo, m, opts, prep):
84 for ctx in cmdutil.walkchangerevs(repo, m, opts, prep):
85 continue
85 continue
86
86
87 if opts.get('progress'):
87 if opts.get('progress'):
@@ -1031,7 +1031,7 b' def finddate(ui, repo, date):'
1031 if df(d[0]):
1031 if df(d[0]):
1032 results[rev] = d
1032 results[rev] = d
1033
1033
1034 for ctx in walkchangerevs(ui, repo, m, {'rev':None}, prep):
1034 for ctx in walkchangerevs(repo, m, {'rev':None}, prep):
1035 rev = ctx.rev()
1035 rev = ctx.rev()
1036 if rev in results:
1036 if rev in results:
1037 ui.status(_("Found revision %s from %s\n") %
1037 ui.status(_("Found revision %s from %s\n") %
@@ -1040,7 +1040,7 b' def finddate(ui, repo, date):'
1040
1040
1041 raise util.Abort(_("revision matching date not found"))
1041 raise util.Abort(_("revision matching date not found"))
1042
1042
1043 def walkchangerevs(ui, repo, match, opts, prepare):
1043 def walkchangerevs(repo, match, opts, prepare):
1044 '''Iterate over files and the revs in which they changed.
1044 '''Iterate over files and the revs in which they changed.
1045
1045
1046 Callers most commonly need to iterate backwards over the history
1046 Callers most commonly need to iterate backwards over the history
@@ -1088,6 +1088,7 b' def walkchangerevs(ui, repo, match, opts'
1088 # No files, no patterns. Display all revs.
1088 # No files, no patterns. Display all revs.
1089 wanted = set(revs)
1089 wanted = set(revs)
1090 copies = []
1090 copies = []
1091
1091 if not slowpath:
1092 if not slowpath:
1092 # Only files, no patterns. Check the history of each file.
1093 # Only files, no patterns. Check the history of each file.
1093 def filerevgen(filelog, node):
1094 def filerevgen(filelog, node):
@@ -1124,8 +1125,6 b' def walkchangerevs(ui, repo, match, opts'
1124 slowpath = True
1125 slowpath = True
1125 break
1126 break
1126 else:
1127 else:
1127 ui.warn(_('%s:%s copy source revision cannot be found!\n')
1128 % (file_, short(node)))
1129 continue
1128 continue
1130 for rev, copied in filerevgen(filelog, node):
1129 for rev, copied in filerevgen(filelog, node):
1131 if rev <= maxrev:
1130 if rev <= maxrev:
@@ -1338,7 +1338,7 b' def grep(ui, repo, pattern, *pats, **opt'
1338 except error.LookupError:
1338 except error.LookupError:
1339 pass
1339 pass
1340
1340
1341 for ctx in cmdutil.walkchangerevs(ui, repo, matchfn, opts, prep):
1341 for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
1342 rev = ctx.rev()
1342 rev = ctx.rev()
1343 parent = ctx.parents()[0].rev()
1343 parent = ctx.parents()[0].rev()
1344 for fn in sorted(revfiles.get(rev, [])):
1344 for fn in sorted(revfiles.get(rev, [])):
@@ -2068,7 +2068,7 b' def log(ui, repo, *pats, **opts):'
2068
2068
2069 displayer.show(ctx, copies=copies)
2069 displayer.show(ctx, copies=copies)
2070
2070
2071 for ctx in cmdutil.walkchangerevs(ui, repo, matchfn, opts, prep):
2071 for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
2072 if count != limit:
2072 if count != limit:
2073 if displayer.flush(ctx.rev()):
2073 if displayer.flush(ctx.rev()):
2074 count += 1
2074 count += 1
General Comments 0
You need to be logged in to leave comments. Login now