# HG changeset patch # User Yuya Nishihara # Date 1543052504 -32400 # Node ID d4c550c703d7177a7bcf1cbd371bb07e72457795 # Parent e7d6a9082bdfe285d7d2f4b77c43bd8a0346db19 annotate: start pager soon after command options are validated It helps extracting helper class. diff -r e7d6a9082bdf -r d4c550c703d7 mercurial/commands.py --- a/mercurial/commands.py Sat Nov 24 18:38:44 2018 +0900 +++ b/mercurial/commands.py Sat Nov 24 18:41:44 2018 +0900 @@ -333,6 +333,7 @@ repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') ctx = scmutil.revsingle(repo, rev) + ui.pager('annotate') rootfm = ui.formatter('annotate', opts) if ui.debugflag: shorthex = pycompat.identity @@ -381,8 +382,6 @@ 'lineno': 'line_number', } - ui.pager('annotate') - if rootfm.isplain(): def makefunc(get, fmt): return lambda x: fmt(get(x))