* [PATCH 0/2] fix create-pull-request
@ 2017-05-17 13:27 Ed Bartosh
2017-05-17 13:27 ` [PATCH 1/2] Revert "create-pull-request: add "-t in-reply-to" option" Ed Bartosh
2017-05-17 13:27 ` [PATCH 2/2] create-pull-request: support format-patch options Ed Bartosh
0 siblings, 2 replies; 3+ messages in thread
From: Ed Bartosh @ 2017-05-17 13:27 UTC (permalink / raw)
To: openembedded-core
Hi,
Reverted previous patch as it breaks the script if used without '-t'.
Replaced its functionality with more generic approach: -- <format-patch options>
The following changes since commit 324f7993e6dfc3b2c7849aee6c525605cc19f223:
isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCH (2017-05-17 13:21:34 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/wic/wip
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip
Ed Bartosh (2):
Revert "create-pull-request: add "-t in-reply-to" option"
create-pull-request: support format-patch options
scripts/create-pull-request | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
--
Regards,
Ed
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] Revert "create-pull-request: add "-t in-reply-to" option"
2017-05-17 13:27 [PATCH 0/2] fix create-pull-request Ed Bartosh
@ 2017-05-17 13:27 ` Ed Bartosh
2017-05-17 13:27 ` [PATCH 2/2] create-pull-request: support format-patch options Ed Bartosh
1 sibling, 0 replies; 3+ messages in thread
From: Ed Bartosh @ 2017-05-17 13:27 UTC (permalink / raw)
To: openembedded-core
Rasons:
- It breaks the script if script is used without -t
- Its functionality covered by the next patch
This reverts commit 3ad3fda6c5f084f4fa1485b30aa333287989bee7.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
scripts/create-pull-request | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 46d65386a3..e82858bc98 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -34,7 +34,7 @@ RFC=0
usage() {
CMD=$(basename $0)
cat <<EOM
-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] [-t in_reply_to]
+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]
-b branch Branch name in the specified remote (default: current branch)
-l local branch Local branch name (default: HEAD)
-c Create an RFC (Request for Comment) patch series
@@ -49,7 +49,6 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
-s subject The subject to be inserted into the summary email
-u remote The git remote where the branch is located, or set CPR_CONTRIB_REMOTE in env
-d relative_dir Generate patches relative to directory
- -t in_reply_to Make mails appear as replies to the given Message-Id, to continue patch/series threads
Examples:
$CMD -u contrib -b nitin/basic
@@ -58,13 +57,12 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to
$CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
$CMD -u contrib -p "RFC PATCH" -b nitin/experimental
$CMD -u contrib -i misc -b nitin/misc -d ./bitbake
- $CMD -u contrib -p "OE-core][PATCH v2" -t "<cover.11146.git.john.doe@example.com>"
EOM
}
REMOTE="$CPR_CONTRIB_REMOTE"
# Parse and validate arguments
-while getopts "b:acd:hi:m:o:p:r:s:u:l:t:" OPT; do
+while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do
case $OPT in
b)
BRANCH="$OPTARG"
@@ -110,8 +108,6 @@ while getopts "b:acd:hi:m:o:p:r:s:u:l:t:" OPT; do
a)
CPR_CONTRIB_AUTO_PUSH="1"
;;
- t)
- IN_REPLY_TO="$OPTARG"
esac
done
@@ -209,11 +205,7 @@ if [ -n "$RELDIR" ]; then
fi
# Generate the patches and cover letter
-if [ -z "$IN_REPLY_TO" ]; then
- git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --in-reply-to="$IN_REPLY_TO" --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
-else
- git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
-fi
+git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
if [ -z "$(ls -A $ODIR 2> /dev/null)" ]; then
echo "ERROR: $ODIR is empty, no cover letter and patches was generated!"
--
2.12.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] create-pull-request: support format-patch options
2017-05-17 13:27 [PATCH 0/2] fix create-pull-request Ed Bartosh
2017-05-17 13:27 ` [PATCH 1/2] Revert "create-pull-request: add "-t in-reply-to" option" Ed Bartosh
@ 2017-05-17 13:27 ` Ed Bartosh
1 sibling, 0 replies; 3+ messages in thread
From: Ed Bartosh @ 2017-05-17 13:27 UTC (permalink / raw)
To: openembedded-core
Added possibility to specify extra format-patch options
in the create-pull-request command line:
create-pull-request -u contrib -r master -- -v3
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
scripts/create-pull-request | 14 +++++++++++---
1 file 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
usage() {
CMD=$(basename $0)
cat <<EOM
-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]
+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>]
-b branch Branch name in the specified remote (default: current branch)
-l local branch Local branch name (default: HEAD)
-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
$CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
$CMD -u contrib -p "RFC PATCH" -b nitin/experimental
$CMD -u contrib -i misc -b nitin/misc -d ./bitbake
+ $CMD -u contrib -r origin/master -o /tmp/out.v3 -- -v3 --in-reply-to=20170511120134.XX7799@site.com
EOM
}
@@ -108,9 +109,16 @@ while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do
a)
CPR_CONTRIB_AUTO_PUSH="1"
;;
+ --)
+ shift
+ break
+ ;;
esac
done
+shift "$((OPTIND - 1))"
+extraopts="$@"
+
if [ -z "$REMOTE" ]; then
echo "ERROR: Missing parameter -u or CPR_CONTRIB_REMOTE in env, no git remote!"
usage
@@ -201,7 +209,7 @@ if [ -n "$RELDIR" ]; then
ODIR=$(realpath $ODIR)
pdir=$(pwd)
cd $RELDIR
- extraopts="--relative"
+ extraopts="$extraopts --relative"
fi
# Generate the patches and cover letter
@@ -218,7 +226,7 @@ fi
[ -n "$RELDIR" ] && cd $pdir
# Customize the cover letter
-CL="$ODIR/0000-cover-letter.patch"
+CL="$(echo $ODIR/*0000-cover-letter.patch)"
PM="$ODIR/pull-msg"
GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/')
NEWER_GIT_VERSION=210
--
2.12.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-17 13:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-17 13:27 [PATCH 0/2] fix create-pull-request Ed Bartosh
2017-05-17 13:27 ` [PATCH 1/2] Revert "create-pull-request: add "-t in-reply-to" option" Ed Bartosh
2017-05-17 13:27 ` [PATCH 2/2] create-pull-request: support format-patch options Ed Bartosh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.