11 git for-each-ref 'refs/remotes' | grep -vE ' refs/remotes/([^/]*/HEAD|.*/archived/.*)$'
16 sed -e 's/&/\&/g; s/</</g; s/>/>/g'
29 filename=`echo -n "$name" | tr -c 'A-Za-z0-9' '_'`.rss
30 outfilename="$outdir/$filename"
31 masterbranch=`echo -n "$masterbranch" | escape_html`
32 branch=`echo -n "$branch" | escape_html`
33 repo=`echo -n "$repo" | escape_html`
35 if [ -n "$repo" ]; then
40 against="$masterbranch at $masterhash"
42 if ! [ -f "$outfilename" ]; then
43 datetime=`date --rfc-2822`
44 cat >"$outfilename" <<EOF
45 <?xml version="1.0" encoding="UTF-8" ?>
46 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
48 <title>XonCW: $name</title>
49 <link>http://git.xonotic.org/</link>
50 <description>Xonotic Conflict Watch for branches by $name</description>
52 <atom:link href="http://nl.git.xonotic.org/xoncw/$filename" rel="self" type="application/rss+xml" />
53 <lastBuildDate>$datetime</lastBuildDate>
56 cat >>"$outfilename" <<EOF
58 <title>$branch$repotxt</title>
59 <link>http://git.xonotic.org/?p=$repo;a=shortlog;h=refs/heads/$branch</link>
60 <guid isPermaLink="false">http://nl.git.xonotic.org/xoncw/$filename#$hash</guid>
61 <description><![CDATA[
62 Conflicts of $branch at $hash against $against:
65 echo -n "<pre>" >>"$outfilename"
66 escape_html >>"$outfilename"
67 echo "</pre>" >>"$outfilename"
69 cat >>"$outfilename" <<EOF
77 datetime=`date --rfc-2822`
78 sed -i -e '/<lastBuildDate>/,$d' "$1"
80 <lastBuildDate>$datetime</lastBuildDate>
92 if [ -z "$outdir" ]; then
98 if [ -n "$repodir" ]; then
101 git config remote.origin.url | cut -d / -f 4-
108 for f in "$outdir"/*; do
109 [ -f "$f" ] || continue
114 for f in "$outdir"/*; do
115 [ -f "$f" ] || continue
122 if [ -n "$repodir" ]; then
130 if [ -n "$repodir" ]; then
133 git symbolic-ref HEAD
136 masterbranch=${masterbranch#refs/heads/}
140 if [ -n "$repodir" ]; then
149 if [ -n "$repodir" ]; then
153 ) | while read -r HASH TYPE REFNAME; do
154 echo >&2 -n "$repo $REFNAME..."
155 case "$repo:$REFNAME" in
156 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant) continue ;;
157 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-original) continue ;;
158 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-split-up-the-q3map2-commit) continue ;;
159 xonotic/netradiant.git:refs/remotes/origin/divVerent/zeroradiant-split-up-the-q3map2-commit-goal) continue ;;
160 xonotic/darkplaces.git:refs/remotes/origin/dp-mqc-render) continue ;;
163 if [ x"$masterhash" = x"$masterhash2" ]; then
164 thismasterhash=$masterhash
165 thismasterbranch=$masterbranch
168 if [ -n "$repodir" ]; then
171 git rev-list "$masterhash".."$REFNAME" | wc -l
174 if [ -n "$repodir" ]; then
177 git rev-list "$masterhash2".."$REFNAME" | wc -l
179 if [ $l -gt $l2 ]; then
180 thismasterhash=$masterhash2
181 thismasterbranch=$masterbranch2
183 thismasterhash=$masterhash
184 thismasterbranch=$masterbranch
190 if [ -n "$repodir" ]; then
193 git reset --hard "$thismasterhash" >/dev/null 2>&1
194 if out=`git merge --no-commit -- "$REFNAME" 2>&1`; then
200 git reset --hard "$masterhash" >/dev/null 2>&1
203 if [ -n "$out" ]; then
204 b=${REFNAME#refs/remotes/[!/]*/}
213 echo "$out" | to_rss "$outdir" "$n" "$thismasterhash" "$thismasterbranch" "$HASH" "$b" "$repo"
221 echo "Usage: $0 --init OUTDIR"
222 echo " $0 --add OUTDIR [REPODIR]"
223 echo " $0 --finish OUTDIR"