Merge branch 'master' of git@gitorious.org:warzone2100/gerard_

master
Git SVN Gateway 2009-03-17 16:52:45 +01:00
commit ca9804de3e
1 changed files with 14 additions and 8 deletions

View File

@ -31,6 +31,17 @@ function is_merge {
return $? return $?
} }
function cherry_pick_from {
if is_merge $1
then
mainline=-m1
else
mainline=
fi
git cherry-pick $mainline $1
return $?
}
if [ $# -ne 2 ] if [ $# -ne 2 ]
then then
echo_c "Usage: gitsvngateway [local branch] [svn remote branch]" echo_c "Usage: gitsvngateway [local branch] [svn remote branch]"
@ -128,12 +139,9 @@ then
for hash2 in $hashes2; do for hash2 in $hashes2; do
echo_c "== Merging $hash2" echo_c "== Merging $hash2"
# remove the first line from the merge file # remove the first line from the merge file
tail -n+2 $filename > ${filename}2 sed -i '1d' $filename
mv ${filename}2 $filename
mainline= if ! cherry_pick_from $hash2
test is_merge $hash2 && mainline=-m1
if ! git cherry-pick $mainline $hash2
then then
echo_c "== Could not merge! Please fix this and commit." echo_c "== Could not merge! Please fix this and commit."
echo_c "== To use the already existing log message use:" echo_c "== To use the already existing log message use:"
@ -151,9 +159,7 @@ then
echo_c "== Squashing this merge" echo_c "== Squashing this merge"
fi fi
fi fi
mainline= if ! cherry_pick_from $hash
test is_merge $hash2 && mainline=-m1
if ! git cherry-pick $mainline $hash
then then
echo_c "== Could not merge! Please fix this and commit." echo_c "== Could not merge! Please fix this and commit."
echo_c "== To use the already existing log message use:" echo_c "== To use the already existing log message use:"