Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] create-pull-request: Add -l location switch
@ 2011-05-10 18:55 Tom Rini
  2011-05-10 19:18 ` Otavio Salvador
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2011-05-10 18:55 UTC (permalink / raw)
  To: openembedded-core

Add a -l switch that takes an argument of either github or gitorious
and will make the cover letter have a fill-in-the-blank of where the
changes are on either github or gitorious.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
---
 scripts/create-pull-request |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 784b48c..2e02d82 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -18,6 +18,7 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
   -b contrib_branch   Branch-name in the $PULL_URL
   -s subject          The subject to be inserted into the summary email
   -p prefix           Use [prefix N/M] instead of [PATCH N/M] as the subject prefix
+  -l location         The location (github or gitorious) where the changes are if not in the default contrib repository
 
  Examples:
    $CMD -b nitin/basic
@@ -28,7 +29,7 @@ EOM
 }
 
 # Parse and validate arguments
-while getopts "b:hi:m:o:r:s:p:" OPT; do
+while getopts "b:hi:i:l:m:o:r:s:p:" OPT; do
     case $OPT in
     b)
         CONTRIB_BRANCH="$OPTARG"
@@ -40,6 +41,22 @@ while getopts "b:hi:m:o:r:s:p:" OPT; do
     i)
         COMMIT_ID="$OPTARG"
         ;;
+    l)
+        case $OPTARG in
+        github)
+            PULL_URL="git://github.com/PROJECT/REPO.git"
+            WEB_URL_PREFIX="https://github.com/PROJECT/REPO/tree/"
+            ;;
+        gitorious)
+            PULL_URL="git://gitorious.org/PROJECT/REPO.git"
+            WEB_URL_PREFIX="http://gitorious.org/PROJECTS/REPO/commits/"
+            ;;
+        *)
+            echo "ERROR: Unknown location where the changes are hosted"
+            exit 1
+            ;;
+        esac
+        ;;
     m)
         BODY="$OPTARG"
         if [ ! -e "$BODY" ]; then
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-12  0:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 18:55 [PATCH] create-pull-request: Add -l location switch Tom Rini
2011-05-10 19:18 ` Otavio Salvador
2011-05-10 23:01   ` Tom Rini
2011-05-11  6:02     ` Martin Jansa
2011-05-11 17:03     ` Richard Purdie
2011-05-11 18:28       ` Darren Hart
2011-05-12  0:55     ` Otavio Salvador
2011-05-11  5:43   ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox