X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Fconflict-watch.sh;h=3ac6e5c728ea49ebce1546ab9098be179e370abe;hb=17ffea374bd5be4a7a8f58ae272fa573d7c4fff1;hp=d20d44e0cf4193f1384e579401f98fc1ed8fef4d;hpb=8e6028b600b56f07f2d889ad81a19008485f283f;p=xonotic%2Fxonotic.git
diff --git a/misc/tools/conflict-watch.sh b/misc/tools/conflict-watch.sh
index d20d44e0..3ac6e5c7 100755
--- a/misc/tools/conflict-watch.sh
+++ b/misc/tools/conflict-watch.sh
@@ -31,11 +31,13 @@ to_rss()
masterbranch=`echo -n "$masterbranch" | escape_html`
branch=`echo -n "$branch" | escape_html`
repo=`echo -n "$repo" | escape_html`
+
if [ -n "$repo" ]; then
repotxt=" in $repo"
else
repotxt=
fi
+ against="$masterbranch at $masterhash"
if ! [ -f "$outfilename" ]; then
datetime=`date --rfc-2822`
@@ -46,7 +48,7 @@ to_rss()
XonCW: $name
http://git.xonotic.org/
Xonotic Conflict Watch for branches by $name
- 3600
+ 10800
$datetime
EOF
@@ -57,7 +59,7 @@ EOF
http://git.xonotic.org/?p=$repo;a=shortlog;h=refs/heads/$branch
http://nl.git.xonotic.org/xoncw/$filename#$hash
" >>"$outfilename"
@@ -132,6 +134,17 @@ case "$action" in
)
)
masterbranch=${masterbranch#refs/heads/}
+
+ masterhash2=$(
+ (
+ if [ -n "$repodir" ]; then
+ cd "$repodir"
+ fi
+ git rev-parse master
+ )
+ )
+ masterbranch2=master
+
(
if [ -n "$repodir" ]; then
cd "$repodir"
@@ -139,12 +152,45 @@ case "$action" in
branches
) | while read -r HASH TYPE REFNAME; do
echo >&2 -n "$repo $REFNAME..."
+ case "$repo:$REFNAME" in
+ xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant) continue ;;
+ xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-original) continue ;;
+ xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-split-up-the-q3map2-commit) continue ;;
+ xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-split-up-the-q3map2-commit-goal) continue ;;
+ xonotic/darkplaces.git:refs/remotes/origin/dp-mqc-render) continue ;;
+ esac
+
+ if [ x"$masterhash" = x"$masterhash2" ]; then
+ thismasterhash=$masterhash
+ thismasterbranch=$masterbranch
+ else
+ l=$(
+ if [ -n "$repodir" ]; then
+ cd "$repodir"
+ fi
+ git rev-list "$masterhash".."$REFNAME" | wc -l
+ )
+ l2=$(
+ if [ -n "$repodir" ]; then
+ cd "$repodir"
+ fi
+ git rev-list "$masterhash2".."$REFNAME" | wc -l
+ )
+ if [ $l -gt $l2 ]; then
+ thismasterhash=$masterhash2
+ thismasterbranch=$masterbranch2
+ else
+ thismasterhash=$masterhash
+ thismasterbranch=$masterbranch
+ fi
+ fi
+
out=$(
(
if [ -n "$repodir" ]; then
cd "$repodir"
fi
- git reset --hard "$masterhash" >/dev/null 2>&1
+ git reset --hard "$thismasterhash" >/dev/null 2>&1
if out=`git merge --no-commit -- "$REFNAME" 2>&1`; then
good=true
else
@@ -155,7 +201,7 @@ case "$action" in
)
)
if [ -n "$out" ]; then
- b=${REFNAME#refs/remotes/[^/]*/}
+ b=${REFNAME#refs/remotes/[!/]*/}
case "$b" in
*/*)
n=${b%%/*}
@@ -164,7 +210,7 @@ case "$action" in
n=divVerent
;;
esac
- echo "$out" | to_rss "$outdir" "$n" "$masterhash" "$masterbranch" "$HASH" "$b" "$repo"
+ echo "$out" | to_rss "$outdir" "$n" "$thismasterhash" "$thismasterbranch" "$HASH" "$b" "$repo"
echo >&2 " CONFLICT"
else
echo >&2 " ok"