Repository: cloudstack
Updated Branches:
  refs/heads/master 82df5b156 -> a527d2729


Improve error/help message in case of missing git remote


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/23b93659
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/23b93659
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/23b93659

Branch: refs/heads/master
Commit: 23b93659967d82494207e8804b8091cb031126f6
Parents: 6d57a86
Author: Remi Bergsma <[email protected]>
Authored: Mon Aug 24 11:52:03 2015 +0200
Committer: Remi Bergsma <[email protected]>
Committed: Mon Aug 24 11:52:03 2015 +0200

----------------------------------------------------------------------
 tools/git/git-pr | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/23b93659/tools/git/git-pr
----------------------------------------------------------------------
diff --git a/tools/git/git-pr b/tools/git/git-pr
index 0dca134..48b8168 100755
--- a/tools/git/git-pr
+++ b/tools/git/git-pr
@@ -47,6 +47,7 @@ fi
 # Check the arguments
 if [ -z ${prId} ]; then
   echo "Usage: git pr pool-request-number [ --force ]"
+  echo "For instructions, see: 
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61311655";
   clean_up_and_exit 1
 fi
 
@@ -178,8 +179,16 @@ fi
 github_remote=$(git remote -v | grep "apache/cloudstack.git" | head -n 1 | cut 
-f1)
 if [ ${#github_remote} -eq 0 ]; then
   echo "ERROR: We couldn't find a git remote pointing to 
'apache/cloudstack.git' to merge the PR from."
-  echo "INFO: Current remotes:"
+  echo "INFO: Currently, your configured remotes are:"
+  echo "INFO: 
***********************************************************************************"
   git remote -v
+  echo "INFO: 
***********************************************************************************"
+  echo "INFO: To merge a PR, we need access to two remotes: "
+  echo "INFO: 1. Read-only access to GitHub mirror"
+  echo "INFO: 2. Read/write access to Apache git"
+  echo "INFO: Please add a remote like this: 'git remote add github 
https://github.com/apache/cloudstack.git'"
+  echo "INFO: For more help, visit: 
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61311655";
+  echo "INFO: Once done, run this script again."
   clean_up_and_exit 1
 fi
 

Reply via email to