cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: cqlsh: check for non-empty history file before loading Patch by Brian O'Neill, reviewed by brandonwilliams for CASSANDRA-4669
Date Fri, 14 Sep 2012 21:46:40 GMT
Updated Branches:
  refs/heads/trunk 398b1d263 -> a500e2835


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/a500e283
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a500e283
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a500e283

Branch: refs/heads/trunk
Commit: a500e2835748f19d0c11bc3dfcecc71c50d9cf7e
Parents: 398b1d2
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Fri Sep 14 16:42:54 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Fri Sep 14 16:46:36 2012 -0500

----------------------------------------------------------------------
 bin/cqlsh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a500e283/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index f60cfe9..8b8046a 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -2539,7 +2539,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("'", "")


Mime
View raw message