# HG changeset patch # User Augie Fackler # Date 2017-03-16 00:34:26 # Node ID 96929bd6e58d29bc3d44e1db7c1283f224bd1dc1 # Parent 9335dc6b2a9c21864c0086e3dad9ea19a8ed6d5f pager: skip running the pager if it's set to 'cat' Avoid useless uses of cat. diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -935,6 +935,9 @@ class ui(object): 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