8 TMPBRANCH
=$MAINTBRANCH-$DEVBRANCH-$
(date "+%Y-%m-%d-%H-%M-%S")
10 if [ -z "$RELPATH" -o -z "$REMOTE" -o -z "$MAINTBRANCH" -o -z "$DEVBRANCH" ] ; then
12 echo "Merge any changes from the maintenance-branch into the development-branch."
13 echo "If there are no conflicts, then push the changes."
15 echo "Usage: $PROG <relpath> <remote> <maintenance-branch> <development-branch>"
17 echo "Example: $PROG drupal upstream 7.x-4.3 7.x-master"
21 pushd "$RELPATH" >> /dev
/null
26 git checkout
-b $TMPBRANCH $REMOTE/$DEVBRANCH
27 git merge
$REMOTE/$MAINTBRANCH |
tee $TMPFILE
30 if grep -q CONFLICT
"$TMPFILE" ; then
32 echo "==> Conflicted merge. Please resolve conflicts and then push with:"
34 echo "git push $REMOTE $TMPBRANCH:$DEVBRANCH"
35 elif grep -q "Already up-to-date." "$TMPFILE" ; then
37 echo "==> No update needed"
41 echo "==> Clean merge; proceeding with push"
44 git push
$REMOTE $TMPBRANCH:$DEVBRANCH
46 git checkout
$REMOTE/$DEVBRANCH
47 git branch
-d $TMPBRANCH