hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lil...@apache.org
Subject incubator-hawq git commit: HAWQ-1050. Support help without dash for register.
Date Wed, 14 Sep 2016 07:22:14 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master be201dcc6 -> cd81289bc


HAWQ-1050. Support help without dash for register.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/cd81289b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/cd81289b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/cd81289b

Branch: refs/heads/master
Commit: cd81289bcbf646c415f97f3f3ee95e2304e8246b
Parents: be201dc
Author: xunzhang <xunzhangthu@gmail.com>
Authored: Wed Sep 14 14:35:44 2016 +0800
Committer: xunzhang <xunzhangthu@gmail.com>
Committed: Wed Sep 14 14:35:44 2016 +0800

----------------------------------------------------------------------
 tools/bin/hawq | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cd81289b/tools/bin/hawq
----------------------------------------------------------------------
diff --git a/tools/bin/hawq b/tools/bin/hawq
index cb06298..82dfd51 100755
--- a/tools/bin/hawq
+++ b/tools/bin/hawq
@@ -6,9 +6,9 @@
 # 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
@@ -176,6 +176,12 @@ def main():
         cmd = "%s; gpscp %s" % (source_hawq_env, sub_args)
         result = local_run(cmd)
     elif hawq_command == "register":
+        if second_arg in ['', 'help', '--help', '-h']:
+            doc_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../docs/cli_help/','hawqregister_help')
+            with open(doc_path, 'r') as f:
+                REGISTER_HELP = f.read()
+            print REGISTER_HELP
+            sys.exit(1)
         cmd = "%s; hawqregister %s" % (source_hawq_env, sub_args)
         result = local_run(cmd)
     elif hawq_command == "version" or hawq_command == "--version":


Mime
View raw message