hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r978973 - in /hbase/trunk: CHANGES.txt src/main/ruby/shell/formatter.rb
Date Sun, 25 Jul 2010 03:48:58 GMT
Author: stack
Date: Sun Jul 25 03:48:58 2010
New Revision: 978973

URL: http://svn.apache.org/viewvc?rev=978973&view=rev
Log:
HBASE-2815 not able to run the test suite in background because TestShell gets suspended on
tty output

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=978973&r1=978972&r2=978973&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Sun Jul 25 03:48:58 2010
@@ -454,6 +454,8 @@ Release 0.21.0 - Unreleased
                becomes invalid (Benôit Sigoure via Stack)
    HBASE-2876  HBase hbck: false positive error reported for parent regions
                that are in offline state in meta after a split
+   HBASE-2815  not able to run the test suite in background because TestShell
+               gets suspended on tty output (Alexey Kovyrin via Stack)
 
   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=978973&r1=978972&r2=978973&view=diff
==============================================================================
--- hbase/trunk/src/main/ruby/shell/formatter.rb (original)
+++ hbase/trunk/src/main/ruby/shell/formatter.rb Sun Jul 25 03:48:58 2010
@@ -30,13 +30,9 @@ module Shell
       end
 
       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
+        @max_width = Java::jline.Terminal.getTerminal().getTerminalWidth() if $stdout.tty?
+        # the above doesn't work in some terminals (such as shell running within emacs)
+        @max_width = 100 if @max_width.to_i.zero?
       end
 
       # Takes an output stream and a print width.



Mime
View raw message