# HG changeset patch # User Benoit Boissinot # Date 2009-11-01 01:54:32 # Node ID c6da1cb3b2558d21c7f875dba6bc8ece011f30c0 # Parent ddf2adf88b89572b8780a5223dff2269a3513240 log --limit: break after a limited number of csets (broken by f3d60543924f) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2069,9 +2069,10 @@ def log(ui, repo, *pats, **opts): displayer.show(ctx, copies=copies) for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep): - if count != limit: - if displayer.flush(ctx.rev()): - count += 1 + if count == limit: + break + if displayer.flush(ctx.rev()): + count += 1 def manifest(ui, repo, node=None, rev=None): """output the current or given revision of the project manifest