]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
a smaller malus for the NL server :P
[xonotic/xonotic.git] / all
diff --git a/all b/all
index 5db6bae96c35af01daae355f9fcb435fdfdfa9a1..ebe505eab9e188f2009ef512602f842291436364 100755 (executable)
--- a/all
+++ b/all
@@ -269,6 +269,18 @@ fix_upstream_rebase()
        if [ -z "$r_me" ] || [ -z "$r_other" ]; then
                return
        fi
+
+       # one of the two sides of the merge should be remote upstream, or all is fine
+       r_r=`git symbolic-ref HEAD`
+       r_r=${r_r#refs/heads/}
+       r_rem=`git config "branch.$r_rem.remote" || $ECHO origin`
+       r_bra=`git config "branch.$r_bra.merge" || $ECHO "$r_r"`
+       if [ x"$r_me" != x"`git rev-parse "$r_rem/$r_bra"`" ]; then
+               if [ x"$r_other" != x"`git rev-parse "$r_rem/$r_bra"`" ]; then
+                       return
+               fi
+       fi
+
        r_base=`git merge-base "$r_me" "$r_other"`
 
        # no merge-base? upstream did filter-branch
@@ -529,7 +541,7 @@ case "$cmd" in
                                newbase=`$ECHO "$base" | sed "s,://\(.*\.\)\?git.xonotic.org/,:// .git.xonotic.org/,"`
                                case "$newbase" in
                                        *\ *)
-                                               if location=`bestmirror $newbase"xonotic.git" de us nl:'*3/2'`; then # 50% malus to the NL server to not overload it too much
+                                               if location=`bestmirror $newbase"xonotic.git" de us nl:'*6/5'`; then # 20% malus to the NL server to not overload it too much
                                                        :
                                                else
                                                        location=current