Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A515D8A4 for ; Mon, 17 Sep 2012 16:44:20 +0000 (UTC) Received: (qmail 59188 invoked by uid 500); 17 Sep 2012 16:44:19 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 59135 invoked by uid 500); 17 Sep 2012 16:44:19 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 59107 invoked by uid 99); 17 Sep 2012 16:44:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2012 16:44:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A4CBE37203; Mon, 17 Sep 2012 16:44:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbellis@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [4/5] git commit: cqlsh: check for non-empty history file before loading Patch by Brian O'Neill, reviewed by brandonwilliams for CASSANDRA-4669 Message-Id: <20120917164419.A4CBE37203@tyr.zones.apache.org> Date: Mon, 17 Sep 2012 16:44:19 +0000 (UTC) cqlsh: check for non-empty history file before loading Patch by Brian O'Neill, reviewed by brandonwilliams for CASSANDRA-4669 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6a8ba073 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6a8ba073 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6a8ba073 Branch: refs/heads/trunk Commit: 6a8ba07313e2fad8c5a6cf7566bbd77321274c60 Parents: 5551d9c Author: Brandon Williams Authored: Fri Sep 14 16:42:54 2012 -0500 Committer: Brandon Williams Committed: Fri Sep 14 16:42:54 2012 -0500 ---------------------------------------------------------------------- bin/cqlsh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a8ba073/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index 3bef142..5f99e45 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -2690,7 +2690,7 @@ def setup_cqlruleset(cqlmodule): def main(options, hostname, port): setup_cqlruleset(options.cqlmodule) - if os.path.exists(HISTORY) and readline is not None: + if os.path.exists(HISTORY) and readline is not None and readline.get_history_length()>0: readline.read_history_file(HISTORY) delims = readline.get_completer_delims() delims.replace("'", "")