fi
cd ..
done
-d0=`pwd`
+export d0=`pwd`
SELF="$d0/all"
# If we are on WINDOWS:
mediasource | | master |
darkplaces | | div0-stable | svn
fteqcc | git://github.com/Blub/qclib.git | master |
-div0-gittools | git://git.icculus.org/divverent/div0-gittools.git | master |
+div0-gittools | | master |
netradiant | | master |
"
# todo: in darkplaces, change repobranch to div0-stable
# no merge-base? upstream did filter-branch
if [ -n "$r_base" ]; then
# otherwise, check if the two histories are "similar"
- r_l_me=`git log --pretty="format:%s" "$r_other".."$r_me" | grep -v "^Merged" | sort -u`
- r_l_other=`git log --pretty="format:%s" "$r_me".."$r_other" | grep -v "^Merged" | sort -u`
+ r_l_me=`git log --pretty="format:%s" "$r_other".."$r_me" | grep -v "^Merge" | sort -u`
+ r_l_other=`git log --pretty="format:%s" "$r_me".."$r_other" | grep -v "^Merge" | sort -u`
# heuristics: upstream rebase/filter-branch if more than 50% of the commits of one of the sides are in the other too
r_lc_me=`echo "$r_l_me" | wc -l`
r_lc_together=`{ echo "$r_l_me"; echo "$r_l_other"; } | sort -u | wc -l`
r_lc_same=$(($r_lc_me + $r_lc_other - $r_lc_together))
- if [ $(( $r_lc_same * 2 )) -le $(( $r_lc_me )) ] && [ $(( $r_lc_same * 2 )) -le $(( $r_lc_other )) ]; then
- if yesno "Probable upstream rebase detected, automatically fix?" 'git log --oneline --graph --left-right "$r_l_other".."$r_l_me"'; then
+ if [ $(( $r_lc_same * 2 )) -gt $(( $r_lc_me )) ] || [ $(( $r_lc_same * 2 )) -gt $(( $r_lc_other )) ]; then
+ if yesno "Probable upstream rebase detected, automatically fix?" 'git log --oneline --graph --date-order --left-right "$r_other"..."$r_me"'; then
git reset --hard "$r_me"
git pull --rebase
return 1
case "$cmd" in
fix_upstream_rebase)
for d in $repos; do
- fix_upstream_rebase_mergefail && fix_upstream_rebase_mergeok
+ enter "$d0/$d" verbose
+ verbose fix_upstream_rebase_mergefail && verbose fix_upstream_rebase_mergeok
done
;;
update|pull)
r=${r#refs/heads/}
if git config branch.$r.remote >/dev/null 2>&1; then
if ! verbose git pull; then
- fix_upstream_rebase_mergefailed || true
+ fix_upstream_rebase_mergefail || true
check_mergeconflict "$d"
echo "Pulling failed. Press ENTER to continue, or Ctrl-C to abort."
read -r DUMMY
rsync --delete -zvaSHPAX "$srcdir"/ "$buildpath/"
(
cd $buildpath
- eval make clean $maketargets $makeflags
+ verbose eval make clean $maketargets $makeflags
)
for f in $targetfiles; do
mv "$buildpath/${f%:*}" "${f##*:}"
;;
*)
rsync --delete -zvaSHPAX "$srcdir"/ "$host:$buildpath/"
- ssh "$host" ". ~/.profile && cd $buildpath && make clean $maketargets $makeflags"
+ verbose ssh "$host" ". ~/.profile && cd $buildpath && make clean $maketargets $makeflags"
for f in $targetfiles; do
rsync -zvaSHPAX "$host:$buildpath/${f%:*}" "${f##*:}"
done
;;
release-engine-win32)
"$SELF" release-compile win32 \
- '"DP_MAKE_TARGET=mingw CC="i586-mingw32msvc-gcc -Wl,--dynamicbase -Wl,--nxcompat -g -DSUPPORTDIRECTX -DUSE_WSPIAPI_H -I$HOME/dp.win32/include -L$HOME/dp.win32/lib" WINDRES="i586-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win32/bin/sdl-config"' \
+ 'DP_MAKE_TARGET=mingw CC="i586-mingw32msvc-gcc -Wl,--dynamicbase -Wl,--nxcompat -g -DSUPPORTDIRECTX -DUSE_WSPIAPI_H -I$HOME/dp.win32/include -L$HOME/dp.win32/lib" WINDRES="i586-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win32/bin/sdl-config"' \
win 'fteqcc.exe:Xonotic/fteqcc/fteqcc.exe' \
debug 'darkplaces.exe:xonotic.exe darkplaces-sdl.exe:xonotic-sdl.exe darkplaces-dedicated.exe:xonotic-dedicated.exe'
;;
release-engine-win64)
"$SELF" release-compile win64 \
- '"DP_MAKE_TARGET=mingw CC="amd64-mingw32msvc-gcc -Wl,--dynamicbase -Wl,--nxcompat -g -DSUPPORTDIRECTX -DUSE_WSPIAPI_H -I$HOME/dp.win64/include -L$HOME/dp.win64/lib" WINDRES="amd64-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win64/bin/sdl-config" LDFLAGS_WINCOMMON=""' \
+ 'DP_MAKE_TARGET=mingw CC="amd64-mingw32msvc-gcc -Wl,--dynamicbase -Wl,--nxcompat -g -DSUPPORTDIRECTX -DUSE_WSPIAPI_H -I$HOME/dp.win64/include -L$HOME/dp.win64/lib" WINDRES="amd64-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win64/bin/sdl-config" LDFLAGS_WINCOMMON=""' \
win 'fteqcc.exe:Xonotic/fteqcc/fteqcc-64.exe' \
debug 'darkplaces.exe:xonotic-64.exe darkplaces-sdl.exe:xonotic-sdl-64.exe darkplaces-dedicated.exe:xonotic-dedicated-64.exe'
;;