commands: exit from the log loop at the right time
Previously, we'd run the iterator one more time than necessary,
potentially doing a lot of extra work in the process.
--- a/mercurial/commands.py Wed Feb 20 11:31:38 2013 -0800
+++ b/mercurial/commands.py Wed Feb 20 11:31:41 2013 -0800
@@ -4215,10 +4215,10 @@
displayer.show(ctx, copies=copies, matchfn=revmatchfn)
for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
+ if displayer.flush(ctx.rev()):
+ count += 1
if count == limit:
break
- if displayer.flush(ctx.rev()):
- count += 1
displayer.close()
@command('manifest',