Return-Path: Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: (qmail 91716 invoked from network); 11 Jun 2010 01:27:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Jun 2010 01:27:52 -0000 Received: (qmail 34969 invoked by uid 500); 11 Jun 2010 01:27:52 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 34944 invoked by uid 500); 11 Jun 2010 01:27:52 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 34934 invoked by uid 99); 11 Jun 2010 01:27:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 01:27:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 01:27:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 30D3523889CB; Fri, 11 Jun 2010 01:27:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r953529 - in /hbase/trunk: CHANGES.txt src/main/ruby/shell/formatter.rb Date: Fri, 11 Jun 2010 01:27:07 -0000 To: commits@hbase.apache.org From: todd@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100611012707.30D3523889CB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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.