mirror of
https://gitlab.com/xonotic/xonotic
synced 2025-01-18 20:21:18 +00:00
use the correct branch source in admin-merge-2 and branch ops
This commit is contained in:
parent
99b2d0ac99
commit
8a38d76f69
23
all
23
all
@ -309,7 +309,6 @@ case "$cmd" in
|
||||
verbose git checkout -b "$branch" "$b"
|
||||
verbose git config "branch.$branch.remote" "$remote"
|
||||
verbose git config "branch.$branch.merge" "refs/heads/$branch"
|
||||
verbose git push origin "$branch"
|
||||
fi
|
||||
fi
|
||||
cd "$d0"
|
||||
@ -415,7 +414,12 @@ case "$cmd" in
|
||||
fi
|
||||
fi
|
||||
rem=`git config "branch.$r.remote" || echo origin`
|
||||
if { git log "$rem/$r".."$r" || git log origin/"`repobranch "$d"`".."$r"; } | grep .; then
|
||||
bra=`git config "branch.$r.merge" || echo "$r"`
|
||||
upstream="$rem/$bra"
|
||||
if ! [ git rev-parse "$upstream" ]; then
|
||||
upstream="`repobranch "$d"`"
|
||||
fi
|
||||
if git log "$upstream".."$r" | grep .; then
|
||||
if yesno "Push \"$r\" in $dv?"; then
|
||||
verbose git push "$rem" HEAD
|
||||
fi
|
||||
@ -423,7 +427,7 @@ case "$cmd" in
|
||||
if [ x"$submit" = x"-s" ]; then
|
||||
case "$r" in
|
||||
*/*)
|
||||
verbose git push "$rem" HEAD:"${r%%/*}/finished/${r#*/}"
|
||||
verbose git push "$rem" HEAD:"${bra%%/*}/finished/${bra#*/}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -650,10 +654,11 @@ case "$cmd" in
|
||||
}
|
||||
for d in $repos; do
|
||||
enter "$d0/$d" verbose
|
||||
base="`repobranch "$d"`"
|
||||
reportecho "In $d:"
|
||||
for ref in `git for-each-ref --format='%(refname)' refs/remotes/origin/`; do
|
||||
case "${ref#refs/remotes/origin/}" in
|
||||
"`repobranch "$d"`")
|
||||
"$base")
|
||||
continue
|
||||
;;
|
||||
HEAD|master)
|
||||
@ -665,8 +670,8 @@ case "$cmd" in
|
||||
if [ -n "$note" ]; then
|
||||
reportdo4 echo "$note"
|
||||
reportecho4 "--> not merging, already had this one rejected before"
|
||||
elif yesno "Branch \"$ref\" may want to get merged. Do it?" '{ git log --color master.."$ref"; git diff --color --find-copies-harder --ignore-space-change master..."$ref"; } | less -r'; then
|
||||
git checkout master
|
||||
elif yesno "Branch \"$ref\" may want to get merged. Do it?" '{ git log --color "$base".."$ref"; git diff --color --find-copies-harder --ignore-space-change "$base"..."$ref"; } | less -r'; then
|
||||
git checkout "$base"
|
||||
org=`git rev-parse HEAD`
|
||||
if ! git merge "$ref" 2>&1 | tee "$t"; then
|
||||
git reset --hard "$org"
|
||||
@ -687,9 +692,11 @@ case "$cmd" in
|
||||
else
|
||||
case ",`repoflags "$d"`," in
|
||||
*,svn,*)
|
||||
git pull
|
||||
git rebase -i "$org"
|
||||
# we do quite a mess here... luckily we know $org
|
||||
git pull # svn needs to be current
|
||||
git rebase -i --onto master "$org"
|
||||
git svn dcommit --add-author-from
|
||||
git reset --hard "$org"
|
||||
;;
|
||||
*)
|
||||
git push origin HEAD
|
||||
|
Loading…
Reference in New Issue
Block a user