[PATCH 01 of 19 pager] cat: migrate to modern pager API

Augie Fackler raf at durin42.com
Sun Feb 19 23:12:52 UTC 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1486439872 18000
#      Mon Feb 06 22:57:52 2017 -0500
# Node ID 2832edeb9d5358b483ad0babbbf3f1dfb43aaf4c
# Parent  7353b9603c574678314f9525b3e56f31a4497bb9
cat: migrate to modern pager API

diff --git a/hgext/pager.py b/hgext/pager.py
--- a/hgext/pager.py
+++ b/hgext/pager.py
@@ -110,4 +110,4 @@ def uisetup(ui):
         extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
     extensions.afterloaded('color', afterloaded)
 
-attended = ['cat', 'diff', 'export', 'glog', 'log', 'qdiff']
+attended = ['diff', 'export', 'glog', 'log', 'qdiff']
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1417,6 +1417,7 @@ def cat(ui, repo, file1, *pats, **opts):
     ctx = scmutil.revsingle(repo, opts.get('rev'))
     m = scmutil.match(ctx, (file1,) + pats, opts)
 
+    ui.pager('cat')
     return cmdutil.cat(ui, repo, ctx, m, '', **opts)
 
 @command('^clone',


More information about the Mercurial-devel mailing list