From 1715e1555a93c0aec50311542c5f40debaea9de9 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 5 Mar 2014 17:56:52 +1100 Subject: [PATCH] turn {import,merge}-cpuinit into -init --- import-cpuinit => import-init | 18 +++++++++--------- merge_cpuinit => merge_init | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) rename import-cpuinit => import-init (57%) rename merge_cpuinit => merge_init (61%) diff --git a/import-cpuinit b/import-init similarity index 57% rename from import-cpuinit rename to import-init index 34c22f6..47c2da9 100755 --- a/import-cpuinit +++ b/import-init @@ -1,6 +1,6 @@ #!/bin/bash -log_file=../cpuinit-import.log +log_file=../init-import.log log() { @@ -14,12 +14,12 @@ execute() [ ${PIPESTATUS[0]} -eq 0 ] || $SHELL -i || exit 1 } -cpuinit="$(cd ../cpuinit;pwd)" -sfile="$cpuinit/series" +init="$(cd ../init;pwd)" +sfile="$init/series" cpwd=$(pwd) base=$1 -log "Importing cpuinit based on $base" +log "Importing init based on $base" base=$(git rev-parse --verify "$base" 2>/dev/null) || { log "Bad base $base" exit 1 @@ -30,20 +30,20 @@ base=$(git rev-parse --verify "$base" 2>/dev/null) || { log '$' cd ../quilt-tmp cd ../quilt-tmp -execute git checkout -b cpuinit/master "$base" -git branch cpuinit/master-base +execute git checkout -b init/master "$base" +git branch init/master-base patches=$(sed -e '/^#/d' -e '/^[ \t]*$/d' "$sfile") for f in $patches; do - execute git am --patch-format=mbox "$cpuinit/$f" + execute git am -3 --patch-format=mbox "$init/$f" done log '$' cd $cpwd cd $cpwd -execute git fetch -f ../quilt-tmp cpuinit/master-base:cpuinit/master-base -execute git fetch -f ../quilt-tmp cpuinit/master:cpuinit/master +execute git fetch -f ../quilt-tmp init/master-base:init/master-base +execute git fetch -f ../quilt-tmp init/master:init/master rm -rf ../quilt-tmp diff --git a/merge_cpuinit b/merge_init similarity index 61% rename from merge_cpuinit rename to merge_init index 999bca9..1659b3c 100755 --- a/merge_cpuinit +++ b/merge_init @@ -29,11 +29,11 @@ execute git clone -s -l -n -q . ../rebase-tmp || { } log '$' cd ../rebase-tmp cd ../rebase-tmp -execute git checkout -b cpuinit remotes/origin/cpuinit/master || { - echo Checkout of remotes/origin/cpuinit/master failed 1>&2 +execute git checkout -b init remotes/origin/init/master || { + echo Checkout of remotes/origin/init/master failed 1>&2 bash -i || exit } -execute git rebase --onto master remotes/origin/cpuinit/master-base || { +execute git rebase --onto master remotes/origin/init/master-base || { echo Rebase failed 1>&2 bash -i || exit } @@ -41,24 +41,24 @@ echo "fix up?" bash -i log '$' cd $cpwd cd $cpwd -execute git fetch -f ../rebase-tmp cpuinit:cpuinit/master || { - echo Fetch of cpuinit/master failed 1>&2 +execute git fetch -f ../rebase-tmp init:init/master || { + echo Fetch of init/master failed 1>&2 bash -i || exit } execute rm -rf ../rebase-tmp -git branch -f cpuinit/master-base HEAD +git branch -f init/master-base HEAD old_head=$(git rev-parse HEAD) -log Merging cpuinit/master '('$(git log -1 --oneline cpuinit/master)')' -execute git merge --no-ff cpuinit/master || { +log Merging init/master '('$(git log -1 --oneline init/master)')' +execute git merge --no-ff init/master || { echo Merge failed 1>&2 bash -i || exit } -printf "%s\t\t%s\n" cpuinit $(git show-ref --hash cpuinit/master) >> $SHA1_FILE +printf "%s\t\t%s\n" init $(git show-ref --hash init/master) >> $SHA1_FILE -[ -f "../merge-fixes/cpuinit" ] && { - for p in $(cat "../merge-fixes/cpuinit"); do +[ -f "../merge-fixes/init" ] && { + for p in $(cat "../merge-fixes/init"); do $(dirname $0)/merge_fix -n "$p" || { bash -i || exit } -- 2.39.5