You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/01/22 16:10:17 UTC

[02/10] cassandra git commit: (cqlsh) encode input correctly when saving history

(cqlsh) encode input correctly when saving history

patch by matthieu.nantern; reviewed by pauloricardomg for CASSANDRA-10948


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3aaae7aa
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3aaae7aa
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3aaae7aa

Branch: refs/heads/cassandra-3.0
Commit: 3aaae7aa59f3a08a657f4e7c93c848864117378f
Parents: deafdbe
Author: Matthieu Nantern <ma...@gmail.com>
Authored: Tue Dec 29 10:15:14 2015 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Jan 22 16:03:20 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt  | 1 +
 bin/cqlsh.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3aaae7aa/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1a92fd6..37a0137 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,6 +23,7 @@
  * Better handling of SSL connection errors inter-node (CASSANDRA-10816)
  * Disable reloading of GossipingPropertyFileSnitch (CASSANDRA-9474)
  * Verify tables in pseudo-system keyspaces at startup (CASSANDRA-10761)
+ * (cqlsh) encode input correctly when saving history
 Merged from 2.1:
  * Fix bad gossip generation seen in long-running clusters (CASSANDRA-10969)
  * Avoid NPE when incremental repair fails (CASSANDRA-10909)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3aaae7aa/bin/cqlsh.py
----------------------------------------------------------------------
diff --git a/bin/cqlsh.py b/bin/cqlsh.py
index c03a3c2..17c42a6 100644
--- a/bin/cqlsh.py
+++ b/bin/cqlsh.py
@@ -1123,7 +1123,7 @@ class Shell(cmd.Cmd):
             new_hist = srcstr.replace("\n", " ").rstrip()
 
             if nl_count > 1 and self.last_hist != new_hist:
-                readline.add_history(new_hist)
+                readline.add_history(new_hist.encode(self.encoding))
 
             self.last_hist = new_hist
         cmdword = tokens[0][1]