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

login
register
mail settings
Submitter Augie Fackler
Date Feb. 19, 2017, 11:12 p.m.
Message ID <2832edeb9d5358b483ad.1487545972@imladris.local>
Download mbox | patch
Permalink /patch/18656/
State Accepted
Headers show

Comments

Augie Fackler - Feb. 19, 2017, 11:12 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1486439872 18000
#      Mon Feb 06 22:57:52 2017 -0500
# Node ID 2832edeb9d5358b483ad0babbbf3f1dfb43aaf4c
# Parent  7353b9603c574678314f9525b3e56f31a4497bb9
cat: migrate to modern pager API
Yuya Nishihara - Feb. 21, 2017, 12:47 p.m.
On Sun, 19 Feb 2017 18:12:52 -0500, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1486439872 18000
> #      Mon Feb 06 22:57:52 2017 -0500
> # Node ID 2832edeb9d5358b483ad0babbbf3f1dfb43aaf4c
> # Parent  7353b9603c574678314f9525b3e56f31a4497bb9
> cat: migrate to modern pager API

The series generally looks good. Queued, thanks!

Patch

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',