# HG changeset patch # User Thomas Arendsen Hein # Date 1140533690 -3600 # Node ID b9fac31f34c9381252f00739b4b97b2e1d1ffddd # Parent 4671078dbfe7fd3dd9d8b44ce9e646cf409dd33c hg log --limit shouldn't count unprinted revisions (found by TK Soh) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1660,9 +1660,10 @@ def log(ui, repo, *pats, **opts): du.write("\n\n") elif st == 'iter': if count == limit: break - count += 1 - for args in du.hunk[rev]: - ui.write(*args) + if du.hunk[rev]: + count += 1 + for args in du.hunk[rev]: + ui.write(*args) def manifest(ui, repo, rev=None): """output the latest or given revision of the project manifest