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 branch=`echo -n "$branch" | escape_html`
34 repo=`echo -n "$repo" | escape_html`
36 if ! [ -f "$outfilename" ]; then
37 datetime=`date --rfc-2822`
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>
46 <atom:link href="http://de.git.xonotic.org/conflicts/$filename" rel="self" type="application/rss+xml" />
47 <lastBuildDate>$datetime</lastBuildDate>
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 echo -n "<pre>" >>"$outfilename"
59 escape_html >>"$outfilename"
60 echo "</pre>" >>"$outfilename"
62 cat >>"$outfilename" <<EOF
70 datetime=`date --rfc-2822`
71 sed -i -e '/<lastBuildDate>/,$d' "$1"
73 <lastBuildDate>$datetime</lastBuildDate>
85 if [ -z "$outdir" ]; then
92 for f in "$outdir"/*; do
93 [ -f "$f" ] || continue
98 for f in "$outdir"/*; do
99 [ -f "$f" ] || continue
106 if [ -n "$repodir" ]; then
113 if [ -n "$repodir" ]; then
117 ) | while read -r HASH TYPE REFNAME; do
118 echo >&2 -n "$repodir $REFNAME..."
121 if [ -n "$repodir" ]; then
124 git reset --hard "$masterhash" >/dev/null 2>&1
125 if out=`git merge --no-commit -- "$REFNAME" 2>&1`; then
131 git reset --hard "$masterhash" >/dev/null 2>&1
134 if [ -n "$out" ]; then
135 b=${REFNAME#refs/remotes/[^/]*/}
144 echo "$out" | to_rss "$outdir" "$n" "$masterhash" "$HASH" "$b" "$repodir"
152 echo "Usage: $0 --init OUTDIR"
153 echo " $0 --add OUTDIR [REPODIR]"
154 echo " $0 --finish OUTDIR"