hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r953529 - in /hbase/trunk: CHANGES.txt src/main/ruby/shell/formatter.rb
Date Fri, 11 Jun 2010 01:27:07 GMT
Author: todd
Date: Fri Jun 11 01:27:06 2010
New Revision: 953529

URL: http://svn.apache.org/viewvc?rev=953529&view=rev
Log:
HBASE-2710. Shell should have default terminal width when detection fails

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/ruby/shell/formatter.rb

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=953529&r1=953528&r2=953529&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Fri Jun 11 01:27:06 2010
@@ -381,6 +381,8 @@ Release 0.21.0 - Unreleased
    HBASE-2684  TestMasterWrongRS flaky in trunk
    HBASE-2691  LeaseStillHeldException totally ignored by RS, wrongly named
    HBASE-2703  ui not working in distributed context
+   HBASE-2710  Shell should use default terminal width when autodetection fails
+               (Kannan Muthukkaruppan via Todd Lipcon)
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hbase/trunk/src/main/ruby/shell/formatter.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/ruby/shell/formatter.rb?rev=953529&r1=953528&r2=953529&view=diff
==============================================================================
--- hbase/trunk/src/main/ruby/shell/formatter.rb (original)
+++ hbase/trunk/src/main/ruby/shell/formatter.rb Fri Jun 11 01:27:06 2010
@@ -31,6 +31,12 @@ module Shell
 
       def refresh_width()
         @max_width = Java::jline.Terminal.getTerminal().getTerminalWidth()
+
+        # the above doesn't work in some terminals
+        # (such as shell running within emacs)
+        if @max_width == 0
+          @max_width = 100
+        end
       end
 
       # Takes an output stream and a print width.



Mime
View raw message