Procházet zdrojové kódy

Update merge script to merge 7.0 to 7.1

* Refactor so that source and target branches are defined in
variables in the beginning of the script.
* Pass a dummy commit message to the merge to avoid opening an editor
while running the script

Merge: manual

Change-Id: I76c001b3bfcfd2dbb1ce2e9ec1b730641df31a77
tags/7.1.0
Leif Åstrand před 11 roky
rodič
revize
888d34c55c
1 změnil soubory, kde provedl 9 přidání a 7 odebrání
  1. 9
    7
      scripts/automerge7.sh

+ 9
- 7
scripts/automerge7.sh Zobrazit soubor

@@ -1,8 +1,10 @@
#!/bin/bash

FROM=origin/7.0
TO=master
PUSH="origin HEAD:refs/for/master"
FROM=7.0
TO=7.1

FROM_HEAD=origin/$FROM
PUSH="origin HEAD:refs/for/$TO"

show() {
sCommit=$1
@@ -23,7 +25,7 @@ merge() {

# echo "merge($mCommit)"

git merge $mCommit $2
git merge -m "Should be overwritten by merge script" $mCommit $2
if [ "$?" != "0" ]
then
echo "Merge failed for commit $mCommit"
@@ -61,14 +63,14 @@ maybe_commit_and_push() {
fi
# echo "maybe_commit_and_push: Merging $cpCommit"
merge $cpCommit
echo -e "Merge changes from $FROM\n\n$cpCommitMsg"|git commit --amend -F -
echo -e "Merge changes from $FROM_HEAD\n\n$cpCommitMsg"|git commit --amend -F -
pushMerged
}

git checkout $TO
git fetch

pending=`git log $TO..$FROM --reverse|grep "^commit "|sed "s/commit //"`
pending=`git log $TO..$FROM_HEAD --reverse|grep "^commit "|sed "s/commit //"`

pendingCommit=
pendingCommitMessage=
@@ -93,7 +95,7 @@ do
echo
# Do a no-op merge
git merge $commit -s ours
echo -e "No-op merge from $FROM\n\n$commitMsg"|git commit --amend -F -
echo -e "No-op merge from $FROM_HEAD\n\n$commitMsg"|git commit --amend -F -
pushMerged
elif [ "$mergeDirective" == "manual" ]
then

Načítá se…
Zrušit
Uložit