Merge branch 'master' of ssh://git.xonotic.org/xonotic
authorRudolf Polzer <divverent@alientrap.org>
Thu, 17 Jun 2010 07:20:48 +0000 (09:20 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 17 Jun 2010 07:20:48 +0000 (09:20 +0200)
1  2 
all

diff --combined all
index 8b2caa053f7382a23ca821f1192265dc69f70529,964233c0182f704382c3e416bb141ed6cab4d147..b88931b4813bc5fb03d40b3ef268cb36014e1c2a
--- 1/all
--- 2/all
+++ b/all
@@@ -250,25 -250,19 +250,25 @@@ case "$cmd" i
                exists=false
                for d in $repos; do
                        enter "$d0/$d" verbose
 -                      if [ -z "$branch" ]; then
 -                              b=`repobranch "$d"`
 -                      else
 -                              b=$branch
 -                      fi
 -                      if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
 +                      b=$branch
 +                      if [ -n "$b" ] && git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
                                exists=true
                                verbose git checkout "$b"
 -                      elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
 +                      elif [ -n "$b" ] && git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
                                exists=true
                                verbose git checkout --track -b "$b" "$remote/$b"
                        else
 -                              verbose git checkout "`repobranch "$d"`"
 +                              b=`repobranch "$d"`
 +                              if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
 +                                      exists=true
 +                                      verbose git checkout "$b"
 +                              elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
 +                                      exists=true
 +                                      verbose git checkout --track -b "$b" "$remote/$b"
 +                              else
 +                                      echo "WTF? Not even branch $b doesn't exist in $d"
 +                                      exit 1
 +                              fi
                        fi
                        cd "$d00"
                        checkself "$cmd" "$@"
                                                ;;
                                esac
                                reportecho "  Branch $ref:"
-                               note=`git notes --ref "refs/notes/admin-merge" show "$ref" 2>/dev/null || true`
+                               note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
                                if [ -n "$note" ]; then
                                        reportdo4 echo "$note"
                                        reportecho4 "--> not merging, already had this one rejected before"
                                        org=`git rev-parse HEAD`
                                        if ! git merge "$ref" 2>&1 | tee "$t"; then
                                                git reset --hard "$org"
-                                               git notes --ref "refs/notes/admin-merge" add -m "Merge failed:$LF`cat "$t"`" "$ref"
+                                               GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Merge failed:$LF`cat "$t"`" "$ref"
                                                reportdo4 cat "$t"
                                                reportecho4 "--> merge failed"
                                        elif ! "$SELF" compile 2>&1 | tee "$t"; then
                                                git reset --hard "$org"
-                                               git notes --ref "refs/notes/admin-merge" add -m "Compile failed:$LF`cat "$t"`" "$ref"
+                                               GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Compile failed:$LF`cat "$t"`" "$ref"
                                                reportdo4 cat "$t"
                                                reportecho4 "--> compile failed"
                                        elif ! yesno "Still merge \"$ref\" into `git symbolic-ref HEAD` of $d? Maybe you want to test first."; then
                                                git reset --hard "$org"
-                                               git notes --ref "refs/notes/admin-merge" add "$ref"
-                                               note=`git notes --ref "refs/notes/admin-merge" show "$ref" 2>/dev/null || true`
+                                               git notes edit "$ref"
+                                               note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
                                                reportdo4 echo "$note"
                                                reportecho4 "--> test failed"
                                        else
                                        fi
                                else
                                        git notes --ref "refs/notes/admin-merge" add "$ref"
-                                       note=`git notes --ref "refs/notes/admin-merge" show "$ref" 2>/dev/null || true`
+                                       note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
                                        if [ -n "$note" ]; then
                                                reportdo4 echo "$note"
                                                reportecho4 "--> rejected"