diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-05-11 16:03:48 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-23 17:45:35 +0100 |
commit | f7c2ec9f8719ee37bdca866c881ca5d853f9aefc (patch) | |
tree | 8f92f632525bc6cef86a567126f5e07cf6072669 /scripts | |
parent | 7e23b174e5fd6fe4a8945e1e276cedd9a90888df (diff) | |
download | poky-f7c2ec9f8719ee37bdca866c881ca5d853f9aefc.tar.gz |
create-pull-request: support format-patch options
Added possibility to specify extra format-patch options
in the create-pull-request command line:
create-pull-request -u contrib -r master -- -v3
(From OE-Core rev: 19e51f05011e827a34890e0c098f3bfa66559e1a)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/create-pull-request | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request index e82858bc98..280880b3f7 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request | |||
@@ -34,7 +34,7 @@ RFC=0 | |||
34 | usage() { | 34 | usage() { |
35 | CMD=$(basename $0) | 35 | CMD=$(basename $0) |
36 | cat <<EOM | 36 | cat <<EOM |
37 | Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch] | 37 | Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch] [-- <format-patch options>] |
38 | -b branch Branch name in the specified remote (default: current branch) | 38 | -b branch Branch name in the specified remote (default: current branch) |
39 | -l local branch Local branch name (default: HEAD) | 39 | -l local branch Local branch name (default: HEAD) |
40 | -c Create an RFC (Request for Comment) patch series | 40 | -c Create an RFC (Request for Comment) patch series |
@@ -57,6 +57,7 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to | |||
57 | $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc | 57 | $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc |
58 | $CMD -u contrib -p "RFC PATCH" -b nitin/experimental | 58 | $CMD -u contrib -p "RFC PATCH" -b nitin/experimental |
59 | $CMD -u contrib -i misc -b nitin/misc -d ./bitbake | 59 | $CMD -u contrib -i misc -b nitin/misc -d ./bitbake |
60 | $CMD -u contrib -r origin/master -o /tmp/out.v3 -- -v3 --in-reply-to=20170511120134.XX7799@site.com | ||
60 | EOM | 61 | EOM |
61 | } | 62 | } |
62 | 63 | ||
@@ -108,9 +109,16 @@ while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do | |||
108 | a) | 109 | a) |
109 | CPR_CONTRIB_AUTO_PUSH="1" | 110 | CPR_CONTRIB_AUTO_PUSH="1" |
110 | ;; | 111 | ;; |
112 | --) | ||
113 | shift | ||
114 | break | ||
115 | ;; | ||
111 | esac | 116 | esac |
112 | done | 117 | done |
113 | 118 | ||
119 | shift "$((OPTIND - 1))" | ||
120 | extraopts="$@" | ||
121 | |||
114 | if [ -z "$REMOTE" ]; then | 122 | if [ -z "$REMOTE" ]; then |
115 | echo "ERROR: Missing parameter -u or CPR_CONTRIB_REMOTE in env, no git remote!" | 123 | echo "ERROR: Missing parameter -u or CPR_CONTRIB_REMOTE in env, no git remote!" |
116 | usage | 124 | usage |
@@ -201,7 +209,7 @@ if [ -n "$RELDIR" ]; then | |||
201 | ODIR=$(realpath $ODIR) | 209 | ODIR=$(realpath $ODIR) |
202 | pdir=$(pwd) | 210 | pdir=$(pwd) |
203 | cd $RELDIR | 211 | cd $RELDIR |
204 | extraopts="--relative" | 212 | extraopts="$extraopts --relative" |
205 | fi | 213 | fi |
206 | 214 | ||
207 | # Generate the patches and cover letter | 215 | # Generate the patches and cover letter |
@@ -218,7 +226,7 @@ fi | |||
218 | [ -n "$RELDIR" ] && cd $pdir | 226 | [ -n "$RELDIR" ] && cd $pdir |
219 | 227 | ||
220 | # Customize the cover letter | 228 | # Customize the cover letter |
221 | CL="$ODIR/0000-cover-letter.patch" | 229 | CL="$(echo $ODIR/*0000-cover-letter.patch)" |
222 | PM="$ODIR/pull-msg" | 230 | PM="$ODIR/pull-msg" |
223 | GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/') | 231 | GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/') |
224 | NEWER_GIT_VERSION=210 | 232 | NEWER_GIT_VERSION=210 |