Mercurial > hg
changeset 18711:6b786dc88612
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.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Wed, 20 Feb 2013 11:31:41 -0800 |
parents | 49ef9d0ca815 |
children | e3ddb4068757 |
files | mercurial/commands.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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',