You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2017/01/21 11:06:12 UTC

[1/2] tinkerpop git commit: remember user's working directory when script files are being loaded in execution mode

Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 8ad291134 -> 67a10923d


remember user's working directory when script files are being loaded in execution mode


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8fd6dbbe
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8fd6dbbe
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8fd6dbbe

Branch: refs/heads/tp32
Commit: 8fd6dbbe9cc0b98d124cd3fdf739377289300ce8
Parents: e80a4cd
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Jan 18 17:18:46 2017 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Jan 18 17:18:46 2017 +0100

----------------------------------------------------------------------
 gremlin-console/src/main/bin/gremlin.sh                      | 4 +++-
 .../org/apache/tinkerpop/gremlin/console/Console.groovy      | 8 +++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fd6dbbe/gremlin-console/src/main/bin/gremlin.sh
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/bin/gremlin.sh b/gremlin-console/src/main/bin/gremlin.sh
index 901610b..d8c94db 100755
--- a/gremlin-console/src/main/bin/gremlin.sh
+++ b/gremlin-console/src/main/bin/gremlin.sh
@@ -22,6 +22,8 @@
 set -e
 set -u
 
+USER_DIR=`pwd`
+
 cd $(dirname $0)
 DIR=`pwd`
 
@@ -90,7 +92,7 @@ while getopts ":l" opt; do
     esac
 done
 
-JAVA_OPTIONS="${JAVA_OPTIONS} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL"
+JAVA_OPTIONS="${JAVA_OPTIONS} -Duser.working_dir=${USER_DIR} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL"
 JAVA_OPTIONS=$(awk -v RS=' ' '!/^$/ {if (!x[$0]++) print}' <<< "${JAVA_OPTIONS}" | grep -v '^$' | paste -sd ' ' -)
 
 if [ -n "$SCRIPT_DEBUG" ]; then

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8fd6dbbe/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index a2e518c..0788f42 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -378,7 +378,13 @@ class Console {
                 groovy.execute("args = []")
             }
 
-            final File file = new File(scriptFile)
+            File file = new File(scriptFile)
+            if (!file.exists() && !file.isAbsolute()) {
+                final String userWorkingDir = System.getProperty("user.working_dir");
+                if (userWorkingDir != null) {
+                    file = new File(userWorkingDir, scriptFile);
+                }
+            }
             int lineNumber = 0
             def lines = file.readLines()
             for (String line : lines) {


[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-1605' into tp32

Posted by dk...@apache.org.
Merge branch 'TINKERPOP-1605' into tp32


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/67a10923
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/67a10923
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/67a10923

Branch: refs/heads/tp32
Commit: 67a10923d77098f403efc187ba43781443d1ed8f
Parents: 8ad2911 8fd6dbb
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Sat Jan 21 12:04:46 2017 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Sat Jan 21 12:04:46 2017 +0100

----------------------------------------------------------------------
 gremlin-console/src/main/bin/gremlin.sh                      | 4 +++-
 .../org/apache/tinkerpop/gremlin/console/Console.groovy      | 8 +++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------