11 git for-each-ref 'refs/remotes' | grep -vE ' refs/remotes/([^/]*/HEAD|.*/archived/.*)$'
16 sed -e 's/&/\&/g; s/</</g; s/>/>/g'
27 if [ -n "$repo" ]; then
31 filename=`echo -n "$name" | tr -c 'A-Za-z0-9' '_'`.rss
32 outfilename="$outdir/$filename"
33 datetime=`date --rfc-2822`
34 branch=`echo "$branch" | escape_html`
35 repo=`echo "$repo" | escape_html`
37 if ! [ -f "$outfilename" ]; then
38 cat >"$outfilename" <<EOF
39 <?xml version="1.0" encoding="UTF-8" ?>
40 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
42 <title>Merge conflicts for $name</title>
43 <link>http://git.xonotic.org/</link>
44 <description>...</description>
45 <lastBuildDate>$datetime</lastBuildDate>
47 <atom:link href="http://de.git.xonotic.org/conflicts/$filename" rel="self" type="application/rss+xml" />
50 cat >>"$outfilename" <<EOF
52 <title>$branch$repo ($hash)</title>
53 <link>http://git.xonotic.org/?p=xonotic/netradiant.git;a=shortlog;h=refs/heads/$name/$branch</link>
54 <guid isPermaLink="false">http://de.git.xonotic.org/conflicts/$filename#$hash-$masterhash</guid>
55 <description><![CDATA[
58 escape_html >>"$outfilename"
60 cat >>"$outfilename" <<EOF
68 sed -i -e '/<item>/,$d' "$1"
79 if [ -z "$outdir" ]; then
86 for f in "$outdir"/*; do
87 [ -f "$f" ] || continue
92 for f in "$outdir"/*; do
93 [ -f "$f" ] || continue
100 if [ -n "$repodir" ]; then
107 if [ -n "$repodir" ]; then
111 ) | while read -r HASH TYPE REFNAME; do
112 echo >&2 -n "$repodir $REFNAME..."
115 if [ -n "$repodir" ]; then
118 git reset --hard "$masterhash" >/dev/null 2>&1
119 if out=`git merge --no-commit -- "$REFNAME" 2>&1`; then
125 git reset --hard "$masterhash" >/dev/null 2>&1
128 if [ -n "$out" ]; then
129 b=${REFNAME#refs/remotes/[^/]*/}
138 echo "$out" | to_rss "$outdir" "$n" "$masterhash" "$HASH" "$b" "$repodir"
146 echo "Usage: $0 --init OUTDIR"
147 echo " $0 --add OUTDIR [REPODIR]"
148 echo " $0 --finish OUTDIR"