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 2020/04/15 14:18:34 UTC
[tinkerpop] branch TINKERPOP-2357 updated (ec8be66 -> c44e130)
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a change to branch TINKERPOP-2357
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.
discard ec8be66 TINKERPOP-2357 Added :cls command to clear console screen
add ac37c7d Pinned pyparsing to versions prior to 3.0.0
add 1956c26 Merge branch '3.3-dev' into 3.4-dev
add 7ac75c2 Bump to gmaven-plus 1.9.0 CTR
add 4d3dca5 Merge branch '3.3-dev' into 3.4-dev
add 78606e0 Removed runtest.py
add 46727de Minor format adjustments CTR
add 08c6f61 Merge branch '3.3-dev' into 3.4-dev
add 8ba99e1 Fixed bug in java options preventing grapes logging CTR
add 52468f9 Merge branch '3.3-dev' into 3.4-dev
add aad8583 TINKERPOP-2345 Improved error message for bad value for math()
add 81cf9aa Merge branch 'TINKERPOP-2345' into 3.4-dev
add dacfd26 gremlin-python: add session mode client
add 217798e gremlin-python: update changelog
add 42582ee gremlin-python: add session close request as specification
add d4e4ab8 Merge branch 'pr-1274' into 3.3-dev
add 81bb372 Improved python session test a bit.
add eb41434 Merge branch '3.3-dev' into 3.4-dev
add dd2ef76 dotnet: add session connection
add 8c04c75 dotnet: C# style as review
add 3a1dd38 dotnet: less variable when rebuild
add b1c50a0 Merge branch 'pr-1257' into 3.3-dev
add fb334df Removed non-standard close message argument for .net driver
add 816d3a1 Merge branch '3.3-dev' into 3.4-dev
add 115d30e gremlin-dotnet: add session close request as specification
add 64cd7a3 Merge branch 'pr-1276' into 3.4-dev
add 183b2c9 Added in .net session test improvement that were added in 3.3-dev
add a9c02e4 gremlin-javascript: remove session close method
add 324500e Merge branch '3.3-dev' into 3.4-dev
add 1871a05 Use UUID in test for session name in javascript CTR
add b8c750e Polished up session documentation across GLVs CTR
add f3d58c3 Merge branch '3.3-dev' into 3.4-dev
add 7e62b47 Fix javadoc CTR
add b9503c2 Merge branch '3.3-dev' into 3.4-dev
new c44e130 TINKERPOP-2357 Added :cls command to clear console screen
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (ec8be66)
\
N -- N -- N refs/heads/TINKERPOP-2357 (c44e130)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CHANGELOG.asciidoc | 5 +-
bin/gephi-mock.py | 7 +-
docs/src/reference/gremlin-variants.asciidoc | 11 +-
docs/src/upgrade/release-3.3.x.asciidoc | 12 +-
gremlin-console/src/main/bin/gremlin.sh | 3 +-
.../gremlin/process/traversal/step/Scoping.java | 22 +-
.../process/traversal/step/map/MathStep.java | 18 +-
.../strategy/decoration/PartitionStrategy.java | 2 +-
.../src/Gremlin.Net/Driver/Connection.cs | 13 +
.../Driver/GremlinClientTests.cs | 24 +-
.../gremlin-javascript/lib/driver/client.js | 20 +-
.../gremlin-javascript/lib/driver/connection.js | 22 -
.../javascript/gremlin-javascript/test/helper.js | 6 +-
.../main/jython/gremlin_python/driver/client.py | 21 +-
.../jython/gremlin_python/driver/serializer.py | 12 +
gremlin-python/src/main/jython/runtest.py | 2892 --------------------
gremlin-python/src/main/jython/setup.py | 5 +-
.../src/main/jython/tests/driver/test_client.py | 31 +
.../process/traversal/CoreTraversalTest.java | 26 +-
pom.xml | 2 +-
20 files changed, 201 insertions(+), 2953 deletions(-)
delete mode 100644 gremlin-python/src/main/jython/runtest.py
[tinkerpop] 01/01: TINKERPOP-2357 Added :cls command to clear
console screen
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2357
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit c44e130333fffdca82c8f3055b289b5717f2361c
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Thu Apr 2 09:03:15 2020 -0400
TINKERPOP-2357 Added :cls command to clear console screen
---
CHANGELOG.asciidoc | 1 +
docs/src/reference/gremlin-applications.asciidoc | 1 +
docs/src/upgrade/release-3.4.x.asciidoc | 5 +++
.../tinkerpop/gremlin/console/Console.groovy | 9 +++++
.../gremlin/console/commands/ClsCommand.groovy | 43 ++++++++++++++++++++++
.../gremlin/console/commands/ClsCommand.properties | 20 ++++++++++
6 files changed, 79 insertions(+)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 57fc98b..99c296e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ This release also includes changes from <<release-3-3-11, 3.3.11>>.
* Gremlin.NET driver: Fixed a `NullReferenceException` and throw clear exception if received message is empty.
* Improved error message for `math()` when the selected key in a `Map` is `null` or not a `Number`.
+* Added `:cls` command to Gremlin Console to clear the screen.
[[release-3-4-6]]
=== TinkerPop 3.4.6 (Release Date: February 20, 2020)
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index cde23f8..51f39df 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -128,6 +128,7 @@ some other useful operations. The following table outlines the most commonly us
|:help |:? |Displays list of commands and descriptions. When followed by a command name, it will display more specific help on that particular item.
|:exit |:x |Ends the Console session.
|import |:i |Import a class into the Console session.
+|:cls |:C |Clear the screen of the Console.
|:clear |:c |Sometimes the Console can get into a state where the command buffer no longer understands input (e.g. a misplaced `(` or `}`). Use this command to clear that buffer.
|:load |:l |Load a file or URL into the command buffer for execution.
|:install |:+ |Imports a Maven library and its dependencies into the Console.
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc b/docs/src/upgrade/release-3.4.x.asciidoc
index 5cbd46b..cc3bf72 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -30,7 +30,12 @@ complete list of all the modifications that are part of this release.
=== Upgrading for Users
+==== Clear Screen Command
+Gremlin Console now has the `:cls` command to clear the screen. This feature acts as an alternative to platform
+specific clear operations and provides a common way to perform that function.
+
+link:https://issues.apache.org/jira/browse/TINKERPOP-2357[TINKERPOP-2357]
== TinkerPop 3.4.6
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 d5b9b62..3dd8e69 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
@@ -28,6 +28,7 @@ import org.apache.tinkerpop.gremlin.console.commands.GremlinSetCommand
import org.apache.tinkerpop.gremlin.console.commands.InstallCommand
import org.apache.tinkerpop.gremlin.console.commands.PluginCommand
import org.apache.tinkerpop.gremlin.console.commands.RemoteCommand
+import org.apache.tinkerpop.gremlin.console.commands.ClsCommand
import org.apache.tinkerpop.gremlin.console.commands.SubmitCommand
import org.apache.tinkerpop.gremlin.console.commands.UninstallCommand
import org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader
@@ -107,6 +108,7 @@ class Console {
groovy.register(new RemoteCommand(groovy, mediator))
groovy.register(new SubmitCommand(groovy, mediator))
groovy.register(new BytecodeCommand(groovy, mediator))
+ groovy.register(new ClsCommand(groovy, mediator))
// hide output temporarily while imports execute
showShellEvaluationOutput(false)
@@ -290,6 +292,13 @@ class Console {
}
}
+ /**
+ * Clears the console screen.
+ */
+ def clear() {
+ io.out.println("\033[H\033[2J")
+ }
+
def printResult(def object) {
final String prompt = Colorizer.render(Preferences.resultPromptColor, buildResultPrompt())
// if preference is set to empty string then don't print any result
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/ClsCommand.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/ClsCommand.groovy
new file mode 100644
index 0000000..b21e0c4
--- /dev/null
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/ClsCommand.groovy
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.console.commands
+
+import org.apache.tinkerpop.gremlin.console.Mediator
+import org.codehaus.groovy.tools.shell.CommandSupport
+import org.codehaus.groovy.tools.shell.Groovysh
+
+/**
+ * Clear the console.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+class ClsCommand extends CommandSupport {
+
+ private final Mediator mediator
+
+ public ClsCommand(final Groovysh shell, final Mediator mediator) {
+ super(shell, ":cls", ":C")
+ this.mediator = mediator
+ }
+
+ @Override
+ def Object execute(final List<String> arguments) {
+ mediator.console.clear();
+ }
+}
\ No newline at end of file
diff --git a/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/commands/ClsCommand.properties b/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/commands/ClsCommand.properties
new file mode 100644
index 0000000..1d17cb6
--- /dev/null
+++ b/gremlin-console/src/main/resources/org/apache/tinkerpop/gremlin/console/commands/ClsCommand.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+command.description=Clear the screen.
+command.usage=
+command.help=Clear the screen.
\ No newline at end of file