You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/12/01 18:19:00 UTC
git commit: cqlsh: hanlde symlinks properly
Updated Branches:
refs/heads/cassandra-2.0 36f54f939 -> b68719524
cqlsh: hanlde symlinks properly
patch by Yinyin L; reviewed by Aleksey Yeschenko for CASSANDRA-6425
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b6871952
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b6871952
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b6871952
Branch: refs/heads/cassandra-2.0
Commit: b68719524eb6d2a928f0975eb85f983667b7ab80
Parents: 36f54f9
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Sun Dec 1 20:17:56 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Sun Dec 1 20:17:56 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
bin/cqlsh | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6871952/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 12469f2..4e77faa 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,7 @@
* Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
* Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
* Expose a total memtable size metric for a CF (CASSANDRA-6391)
+ * cqlsh: hanlde symlinks properly (CASSANDRA-6425)
Merged from 1.2:
* Fix thundering herd on endpoint cache invalidation (CASSANDRA-6345)
* cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6871952/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index acfb1f6..094aa84 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -66,9 +66,11 @@ except ImportError:
CQL_LIB_PREFIX = 'cql-internal-only-'
THRIFT_LIB_PREFIX = 'thrift-python-internal-only-'
+CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
+
# use bundled libs for python-cql and thrift, if available. if there
# is a ../lib dir, use bundled libs there preferentially.
-ZIPLIB_DIRS = [os.path.join(os.path.dirname(__file__), '..', 'lib')]
+ZIPLIB_DIRS = [os.path.join(CASSANDRA_PATH, 'lib')]
myplatform = platform.system()
if myplatform == 'Linux':
ZIPLIB_DIRS.append('/usr/share/cassandra/lib')
@@ -106,7 +108,7 @@ from cql.cqltypes import (cql_types, cql_typename, lookup_casstype, lookup_cqlty
# cqlsh should run correctly when run out of a Cassandra source tree,
# out of an unpacked Cassandra tarball, and after a proper package install.
-cqlshlibdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'pylib')
+cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib')
if os.path.isdir(cqlshlibdir):
sys.path.insert(0, cqlshlibdir)