[svk-commit] r3144 - trunk/lib/SVK/Command

nobody at bestpractical.com nobody at bestpractical.com
Sun Dec 28 23:41:30 EST 2008


Author: gugod
Date: Sun Dec 28 23:41:29 2008
New Revision: 3144

Modified:
   trunk/lib/SVK/Command/Log.pm

Log:
pipe 'svk log' to SVKPAGER if that's defined and executable.


Modified: trunk/lib/SVK/Command/Log.pm
==============================================================================
--- trunk/lib/SVK/Command/Log.pm	(original)
+++ trunk/lib/SVK/Command/Log.pm	Sun Dec 28 23:41:29 2008
@@ -55,7 +55,7 @@
 use base qw( SVK::Command );
 use SVK::XD;
 use SVK::I18N;
-use SVK::Util qw( traverse_history get_encoding reformat_svn_date );
+use SVK::Util qw( traverse_history get_encoding reformat_svn_date can_run );
 use List::Util qw(max min);
 use SVK::Logger;
 
@@ -152,6 +152,11 @@
         quiet         => $self->{quiet},
         verbose       => $self->{verbose},
     );
+
+    if($ENV{SVKPAGER} && can_run($ENV{SVKPAGER})){
+        eval '$ENV{PAGER}=$ENV{SVKPAGER};use IO::Pager;IO::Pager->new(*STDOUT)';
+    }
+
     _get_logs(
         root     => $target->root,
         path     => $target->path_anchor,


More information about the svk-commit mailing list