Patchwork [02,of,19,pager] diff: migrate to modern pager API

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

Comments

Augie Fackler - Feb. 19, 2017, 11:12 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1486439906 18000
#      Mon Feb 06 22:58:26 2017 -0500
# Node ID c0e57f44ebed1240c000850ce256d928cdb69312
# Parent  2832edeb9d5358b483ad0babbbf3f1dfb43aaf4c
diff: migrate to modern pager API

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 = ['diff', 'export', 'glog', 'log', 'qdiff']
+attended = ['export', 'glog', 'log', 'qdiff']
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1940,6 +1940,7 @@  def diff(ui, repo, *pats, **opts):
 
     diffopts = patch.diffallopts(ui, opts)
     m = scmutil.match(repo[node2], pats, opts)
+    ui.pager('diff')
     cmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat,
                            listsubrepos=opts.get('subrepos'),
                            root=opts.get('root'))