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

2017-02-21 Thread Yuya Nishihara
On Sun, 19 Feb 2017 18:12:52 -0500, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler 
> # 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!
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


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

2017-02-19 Thread Augie Fackler
# HG changeset patch
# User Augie Fackler 
# 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',
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel