Show More
@@ -55,12 +55,11 b' def countrate(ui, repo, amap, *pats, **o' | |||
|
55 | 55 | |
|
56 | 56 | get = util.cachefunc(lambda r: repo[r]) |
|
57 | 57 | m = cmdutil.match(repo, pats, opts) |
|
58 |
for st, |
|
|
59 | ||
|
58 | for st, ctx, fns in cmdutil.walkchangerevs(ui, repo, m, get, opts): | |
|
60 | 59 | if not st == 'add': |
|
61 | 60 | continue |
|
62 | 61 | |
|
63 |
|
|
|
62 | rev = ctx.rev() | |
|
64 | 63 | if df and not df(ctx.date()[0]): # doesn't match date format |
|
65 | 64 | continue |
|
66 | 65 |
@@ -1217,15 +1217,16 b' def walkchangerevs(ui, repo, match, chan' | |||
|
1217 | 1217 | nrevs = [rev for rev in revs[i:i+window] if want(rev)] |
|
1218 | 1218 | for rev in sorted(nrevs): |
|
1219 | 1219 | fns = fncache.get(rev) |
|
1220 | ctx = change(rev) | |
|
1220 | 1221 | if not fns: |
|
1221 | 1222 | def fns_generator(): |
|
1222 |
for f in c |
|
|
1223 | for f in ctx.files(): | |
|
1223 | 1224 | if match(f): |
|
1224 | 1225 | yield f |
|
1225 | 1226 | fns = fns_generator() |
|
1226 |
yield 'add', |
|
|
1227 | yield 'add', ctx, fns | |
|
1227 | 1228 | for rev in nrevs: |
|
1228 | yield 'iter', rev, None | |
|
1229 | yield 'iter', change(rev), None | |
|
1229 | 1230 | return iterate() |
|
1230 | 1231 | |
|
1231 | 1232 | def commit(ui, repo, commitfunc, pats, opts): |
@@ -1292,9 +1292,9 b' def grep(ui, repo, pattern, *pats, **opt' | |||
|
1292 | 1292 | matchfn = cmdutil.match(repo, pats, opts) |
|
1293 | 1293 | found = False |
|
1294 | 1294 | follow = opts.get('follow') |
|
1295 |
for st, |
|
|
1295 | for st, ctx, fns in cmdutil.walkchangerevs(ui, repo, matchfn, get, opts): | |
|
1296 | 1296 | if st == 'add': |
|
1297 |
|
|
|
1297 | rev = ctx.rev() | |
|
1298 | 1298 | pctx = ctx.parents()[0] |
|
1299 | 1299 | parent = pctx.rev() |
|
1300 | 1300 | matches.setdefault(rev, {}) |
@@ -1328,6 +1328,7 b' def grep(ui, repo, pattern, *pats, **opt' | |||
|
1328 | 1328 | except error.LookupError: |
|
1329 | 1329 | pass |
|
1330 | 1330 | elif st == 'iter': |
|
1331 | rev = ctx.rev() | |
|
1331 | 1332 | parent = get(rev).parents()[0].rev() |
|
1332 | 1333 | for fn in sorted(revfiles.get(rev, [])): |
|
1333 | 1334 | states = matches[rev][fn] |
@@ -2026,8 +2027,9 b' def log(ui, repo, *pats, **opts):' | |||
|
2026 | 2027 | only_branches = opts.get('only_branch') |
|
2027 | 2028 | |
|
2028 | 2029 | displayer = cmdutil.show_changeset(ui, repo, opts, True, matchfn) |
|
2029 |
for st, |
|
|
2030 | for st, ctx, fns in cmdutil.walkchangerevs(ui, repo, matchfn, get, opts): | |
|
2030 | 2031 | if st == 'add': |
|
2032 | rev = ctx.rev() | |
|
2031 | 2033 | parents = [p for p in repo.changelog.parentrevs(rev) |
|
2032 | 2034 | if p != nullrev] |
|
2033 | 2035 | if opts.get('no_merges') and len(parents) == 2: |
@@ -2035,7 +2037,6 b' def log(ui, repo, *pats, **opts):' | |||
|
2035 | 2037 | if opts.get('only_merges') and len(parents) != 2: |
|
2036 | 2038 | continue |
|
2037 | 2039 | |
|
2038 | ctx = get(rev) | |
|
2039 | 2040 | if only_branches and ctx.branch() not in only_branches: |
|
2040 | 2041 | continue |
|
2041 | 2042 | |
@@ -2068,7 +2069,7 b' def log(ui, repo, *pats, **opts):' | |||
|
2068 | 2069 | |
|
2069 | 2070 | elif st == 'iter': |
|
2070 | 2071 | if count == limit: break |
|
2071 | if displayer.flush(rev): | |
|
2072 | if displayer.flush(ctx.rev()): | |
|
2072 | 2073 | count += 1 |
|
2073 | 2074 | |
|
2074 | 2075 | def manifest(ui, repo, node=None, rev=None): |
General Comments 0
You need to be logged in to leave comments.
Login now