You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/07/05 15:45:58 UTC

[08/11] tinkerpop git commit: TINKERPOP-1651 Removed ability to pass a script to gremlin.sh without a flag

TINKERPOP-1651 Removed ability to pass a script to gremlin.sh without a flag

This feature was deprecated long ago, but we tried to maintain compatibility up until now


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

Branch: refs/heads/master
Commit: 1c39d670a216a5ae694f2551504e90a826de6595
Parents: 6b50de5
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Jun 29 15:05:02 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Jun 29 15:05:02 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                     |  1 +
 docs/src/upgrade/release-3.3.x.asciidoc                | 13 +++++++------
 .../apache/tinkerpop/gremlin/console/Console.groovy    | 10 ++--------
 3 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c39d670/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 0669888..8c62c29 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* `gremlin.sh` and `gremln.bat` no longer support the option to pass a script as an argument for execution mode without using the `-i` option.
 * Graphite and Ganglia are no longer packaged with the Gremlin Server distribution.
 * `TransactionException` is no longer a class of `AbstractTransaction` and it extends `RuntimeException`.
 * Included an ellipse on long property names that are truncated.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c39d670/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index d87f3bb..cc959fc 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -151,11 +151,11 @@ used in `optional()`. However, the behavior would be unpredictable so this backw
 
 See link:https://issues.apache.org/jira/browse/TINKERPOP-1506[TINKERPOP-1506]
 
-Gremlin Console Script Execution
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Gremlin Console Initialization
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-It is no longer possible to run a script in execution mode in the Gremlin Console from the terminal without use of `-e`.
-In other words, prior versions allowed:
+It is no longer possible to intialize the Gremlin Console with a script without use of `-e`. In other words, prior
+versions allowed:
 
 [source,text]
 bin/gremlin.sh gremlin.groovy
@@ -163,9 +163,10 @@ bin/gremlin.sh gremlin.groovy
 Such a command must now be written as:
 
 [source,text]
-bin/gremlin.sh -e gremlin.groovy
+bin/gremlin.sh -i gremlin.groovy
 
-See: link:https://issues.apache.org/jira/browse/TINKERPOP-1283[TINKERPOP-1283]
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1283[TINKERPOP-1283],
+link:https://issues.apache.org/jira/browse/TINKERPOP-1651[TINKERPOP-1651]
 
 GraphTraversal valueMap() Signature Updated
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c39d670/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 1b6100b..7a1837e 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
@@ -446,14 +446,8 @@ class Console {
             System.exit(0)
         }
 
-        // need to do some up front processing to try to support "bin/gremlin.sh init.groovy" until this deprecated
-        // feature can be removed. ultimately this should be removed when a breaking change can go in
-        if (args.length == 1 && !args[0].startsWith("-")) {
-            new Console(io, [[args[0]]], true)
-        } else {
-            def scriptAndArgs = parseArgs(options.e ? "-e" : "-i", args, cli)
-            new Console(io, scriptAndArgs, !options.e)
-        }
+        def scriptAndArgs = parseArgs(options.e ? "-e" : "-i", args, cli)
+        new Console(io, scriptAndArgs, !options.e)
     }
 
     /**