Mercurial > hg
diff mercurial/commands.py @ 35545:349bcd7fa670
log: remove redundant handling of --limit
A returned 'revs' set is pre-filtered by cmdutil.getlogrevs(). The result
of displayer.flush() isn't used anymore, so removed.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 22 Oct 2017 22:38:16 +0900 |
parents | a7f7eff4ec08 |
children | b14c8bcfbad9 |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Oct 22 23:04:07 2017 +0900 +++ b/mercurial/commands.py Sun Oct 22 22:38:16 2017 +0900 @@ -3433,9 +3433,6 @@ elif filematcher is None: filematcher = lrfilematcher - limit = cmdutil.loglimit(opts) - count = 0 - getrenamed = None if opts.get('copies'): endrev = None @@ -3446,8 +3443,6 @@ ui.pager('log') displayer = cmdutil.show_changeset(ui, repo, opts, buffered=True) for rev in revs: - if count == limit: - break ctx = repo[rev] copies = None if getrenamed is not None and rev: @@ -3466,8 +3461,7 @@ revhunksfilter = None displayer.show(ctx, copies=copies, matchfn=revmatchfn, hunksfilterfn=revhunksfilter) - if displayer.flush(ctx): - count += 1 + displayer.flush(ctx) displayer.close()