-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
umpf: add new flag to insert 'Upstream-Status: Pending' lines to all …
…patches Starting with the mickledore release, the upstream status is required for all patches in Yocto. Add a new flag "upstreamstatus" to handle this. If set to "insert", "Upstream-Status: Pending" is added to the commit message of all patches during "umpf tag". Signed-off-by: Michael Olbrich <[email protected]>
- Loading branch information
1 parent
ee2ec1b
commit 35cc7a3
Showing
1 changed file
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,12 +82,18 @@ GIT_DIR="${GIT_DIR:-.git}" | |
STATE="${GIT_DIR}/umpf" | ||
|
||
### flags #### | ||
SUPPORTED_FLAGS=("extraversion") | ||
SUPPORTED_FLAGS=("extraversion" "upstreamstatus") | ||
|
||
declare -A flag_extraversion | ||
|
||
flag_extraversion[val]="replace" | ||
flag_extraversion[values]="replace conflictfree" | ||
|
||
declare -A flag_upstreamstatus | ||
|
||
flag_upstreamstatus[val]="none" | ||
flag_upstreamstatus[values]="none insert" | ||
|
||
############## | ||
|
||
info() { | ||
|
@@ -1105,7 +1111,30 @@ rebase_branch() { | |
committerdate="$(${GIT} log -1 --format=%cd --date=raw "$(<"${STATE}/base")")" | ||
fi | ||
if ! FILTER_BRANCH_SQUELCH_WARNING=1 "${GIT}" filter-branch -f --env-filter "GIT_COMMITTER_DATE='$committerdate'; GIT_COMMITTER_NAME=umpf; [email protected]" "$(<"${STATE}/prev_head").."; then | ||
declare -a msg_filter | ||
if [ "${flag_upstreamstatus[val]}" = "insert" ]; then | ||
msg_filter=( | ||
--msg-filter | ||
"awk ' | ||
/^Upstream-Status:/ { | ||
done=1 | ||
} | ||
/^[^\s]*-by:/ { | ||
if (!done) { | ||
print \"Upstream-Status: Pending\n\" | ||
done=1 | ||
} | ||
} | ||
{ | ||
print \$0 | ||
} | ||
END { | ||
if (!done) | ||
print \"\nUpstream-Status: Pending\" | ||
}'" ) | ||
fi | ||
if ! FILTER_BRANCH_SQUELCH_WARNING=1 "${GIT}" filter-branch -f "${msg_filter[@]}" --env-filter "GIT_COMMITTER_DATE='$committerdate'; GIT_COMMITTER_NAME=umpf; [email protected]" "$(<"${STATE}/prev_head").."; then | ||
bailout "rewrite for reproducible commit-ish failed." | ||
fi | ||
echo "# umpf-topic-range: $(<"${STATE}/prev_head")..$(${GIT} rev-parse HEAD)" >&${series_out} | ||
|