changeset 40716:d4c550c703d7

annotate: start pager soon after command options are validated It helps extracting helper class.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 24 Nov 2018 18:41:44 +0900
parents e7d6a9082bdf
children 92c574684f75
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))