changeset 31486:96929bd6e58d

pager: skip running the pager if it's set to 'cat' Avoid useless uses of cat.
author Augie Fackler <augie@google.com>
date Wed, 15 Mar 2017 20:34:26 -0400
parents 9335dc6b2a9c
children 07fe520280d2
files mercurial/ui.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Mar 15 20:33:47 2017 -0400
+++ b/mercurial/ui.py	Wed Mar 15 20:34:26 2017 -0400
@@ -935,6 +935,9 @@
         This is separate in part so that extensions (like chg) can
         override how a pager is invoked.
         """
+        if command == 'cat':
+            # Save ourselves some work.
+            return
         # If the command doesn't contain any of these characters, we
         # assume it's a binary and exec it directly. This means for
         # simple pager command configurations, we can degrade