11 git for-each-ref 'refs/remotes' | grep -vE ' refs/remotes/([^/]*/HEAD|.*/archived/.*)$'
16 sed -e 's/&/\&/g; s/</</g; s/>/>/g'
31 filename=`echo -n "$name" | tr -c 'A-Za-z0-9' '_'`.rss
32 outfilename="$outdir/$filename"
33 masterbranch=`echo -n "$masterbranch" | escape_html`
34 masterbranch2=`echo -n "$masterbranch2" | escape_html`
35 branch=`echo -n "$branch" | escape_html`
36 repo=`echo -n "$repo" | escape_html`
37 if [ -n "$repo" ]; then
43 if [ x"$masterhash" = x"$masterhash2" ]; then
44 against="$masterbranch at $masterhash"
46 against="$masterbranch at $masterhash or $masterbranch2 at $masterhash2"
49 if ! [ -f "$outfilename" ]; then
50 datetime=`date --rfc-2822`
51 cat >"$outfilename" <<EOF
52 <?xml version="1.0" encoding="UTF-8" ?>
53 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
55 <title>XonCW: $name</title>
56 <link>http://git.xonotic.org/</link>
57 <description>Xonotic Conflict Watch for branches by $name</description>
59 <atom:link href="http://nl.git.xonotic.org/xoncw/$filename" rel="self" type="application/rss+xml" />
60 <lastBuildDate>$datetime</lastBuildDate>
63 cat >>"$outfilename" <<EOF
65 <title>$branch$repotxt</title>
66 <link>http://git.xonotic.org/?p=$repo;a=shortlog;h=refs/heads/$branch</link>
67 <guid isPermaLink="false">http://nl.git.xonotic.org/xoncw/$filename#$hash</guid>
68 <description><![CDATA[
69 Conflicts of $branch at $hash against $against:
72 echo -n "<pre>" >>"$outfilename"
73 escape_html >>"$outfilename"
74 echo "</pre>" >>"$outfilename"
76 cat >>"$outfilename" <<EOF
84 datetime=`date --rfc-2822`
85 sed -i -e '/<lastBuildDate>/,$d' "$1"
87 <lastBuildDate>$datetime</lastBuildDate>
99 if [ -z "$outdir" ]; then
105 if [ -n "$repodir" ]; then
108 git config remote.origin.url | cut -d / -f 4-
115 for f in "$outdir"/*; do
116 [ -f "$f" ] || continue
121 for f in "$outdir"/*; do
122 [ -f "$f" ] || continue
129 if [ -n "$repodir" ]; then
137 if [ -n "$repodir" ]; then
140 git symbolic-ref HEAD
143 masterbranch=${masterbranch#refs/heads/}
147 if [ -n "$repodir" ]; then
156 if [ -n "$repodir" ]; then
160 ) | while read -r HASH TYPE REFNAME; do
161 echo >&2 -n "$repo $REFNAME..."
162 case "$repo:$REFNAME" in
163 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant) continue ;;
164 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-original) continue ;;
165 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-split-up-the-q3map2-commit) continue ;;
166 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-split-up-the-q3map2-commit-goal) continue ;;
167 xonotic/fteqcc.git:refs/remotes/origin/wip) continue ;;
168 xonotic/darkplaces:refs/remotes/origin/master) continue ;;
169 xonotic/darkplaces:refs/remotes/origin/dp-mqc-render) continue ;;
173 if [ -n "$repodir" ]; then
176 git reset --hard "$masterhash" >/dev/null 2>&1
177 if out=`git merge --no-commit -- "$REFNAME" 2>&1`; then
180 if [ x"$masterbranch2" != x"$masterbranch" ]; then
181 git reset --hard "$masterhash2" >/dev/null 2>&1
182 if out2=`git merge --no-commit -- "$REFNAME" 2>&1`; then
186 l=`echo "$out" | wc -l`
187 l2=`echo "$out2" | wc -l`
188 if [ $l -gt $l2 ]; then
199 git reset --hard "$masterhash" >/dev/null 2>&1
202 if [ -n "$out" ]; then
203 b=${REFNAME#refs/remotes/[!/]*/}
212 echo "$out" | to_rss "$outdir" "$n" "$masterhash" "$masterbranch" "$masterhash2" "$masterbranch2" "$HASH" "$b" "$repo"
220 echo "Usage: $0 --init OUTDIR"
221 echo " $0 --add OUTDIR [REPODIR]"
222 echo " $0 --finish OUTDIR"