<div dir="ltr">Looks like the earlier version of this with the wrong -z vs -n got merged, please submit a follow-up patch to fix it.<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 5, 2017 at 12:38 PM, Jose Lamego <span dir="ltr"><<a href="mailto:jose.a.lamego@linux.intel.com" target="_blank">jose.a.lamego@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The create-pull-request script creates patches as replies to a cover<br>
<span class="">letter, in the form of an email thread. If further revisions are sent to<br>
the mailing list without referencing to the first revision, these new<br>
revisions are not identified at the mailing list as part of the original<br>
thread, but as a new thread instead.<br>
<br>
This change adds the "[-t in_reply_to]" option, where "in_reply_to" is<br>
the original cover letter's Message-Id, so this reference is added<br>
to the new cover letter to ensure the thread continuity.<br>
<br>
[YOCTO #11294]<br>
<br>
Signed-off-by: Jose Lamego <<a href="mailto:jose.a.lamego@linux.intel.com">jose.a.lamego@linux.intel.com</a><wbr>><br>
---<br>
</span> scripts/create-pull-request | 17 +++++++++++++----<br>
1 file changed, 13 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/scripts/create-pull-request b/scripts/create-pull-request<br>
index e82858b..8f0be99 100755<br>
<div><div class="h5">--- a/scripts/create-pull-request<br>
+++ b/scripts/create-pull-request<br>
@@ -34,7 +34,7 @@ RFC=0<br>
usage() {<br>
CMD=$(basename $0)<br>
cat <<EOM<br>
-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]<br>
+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]<br>
-b branch Branch name in the specified remote (default: current branch)<br>
-l local branch Local branch name (default: HEAD)<br>
-c Create an RFC (Request for Comment) patch series<br>
@@ -49,6 +49,7 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to<br>
-s subject The subject to be inserted into the summary email<br>
-u remote The git remote where the branch is located, or set CPR_CONTRIB_REMOTE in env<br>
-d relative_dir Generate patches relative to directory<br>
+ -t in_reply_to Make mails appear as replies to the given Message-Id, to continue patch/series threads<br>
<br>
Examples:<br>
$CMD -u contrib -b nitin/basic<br>
@@ -57,12 +58,13 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to<br>
$CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc<br>
$CMD -u contrib -p "RFC PATCH" -b nitin/experimental<br>
$CMD -u contrib -i misc -b nitin/misc -d ./bitbake<br>
+ $CMD -u contrib -p "OE-core][PATCH v2" -t "<<a href="mailto:cover.11146.git.john.doe@example.com">cover.11146.git.john.doe@<wbr>example.com</a>>"<br>
EOM<br>
}<br>
<br>
REMOTE="$CPR_CONTRIB_REMOTE"<br>
# Parse and validate arguments<br>
-while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do<br>
+while getopts "b:acd:hi:m:o:p:r:s:u:l:t:" OPT; do<br>
case $OPT in<br>
b)<br>
BRANCH="$OPTARG"<br>
</div></div>@@ -108,7 +110,10 @@ while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do<br>
a)<br>
CPR_CONTRIB_AUTO_PUSH="1"<br>
;;<br>
- esac<br>
<span class="">+ t)<br>
+ IN_REPLY_TO="$OPTARG"<br>
</span><span class="">+ ;;<br>
+ esac<br>
done<br>
<br>
if [ -z "$REMOTE" ]; then<br>
</span>@@ -205,7 +210,11 @@ if [ -n "$RELDIR" ]; then<br>
<span class=""> fi<br>
<br>
# Generate the patches and cover letter<br>
-git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null<br>
</span>+if [ -n "$IN_REPLY_TO" ]; then<br>
<div class="HOEnZb"><div class="h5">+ 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<br>
+else<br>
+ git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null<br>
+fi<br>
<br>
if [ -z "$(ls -A $ODIR 2> /dev/null)" ]; then<br>
echo "ERROR: $ODIR is empty, no cover letter and patches was generated!"<br>
--<br>
2.7.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>
</div></div>