public inbox for gcc-cvs-wwwdocs@sourceware.org help / color / mirror / Atom feed
From: jakub@gcc.gnu.org To: gcc-cvs-wwwdocs@gcc.gnu.org Subject: gcc-wwwdocs branch master updated. b67331e8d2eb99861e9042a6c75be3eea398fa81 Date: Mon, 13 Jan 2020 14:54:00 -0000 [thread overview] Message-ID: <20200113145411.3090.qmail@sourceware.org> (raw) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gcc-wwwdocs". The branch, master has been updated via b67331e8d2eb99861e9042a6c75be3eea398fa81 (commit) from 99f2a846b7a5a4918ae48b4e08951192872e5355 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b67331e8d2eb99861e9042a6c75be3eea398fa81 Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Jan 13 15:53:41 2020 +0100 Add a cgi script of monotonic revision ids. diff --git a/cgi-bin/gcc-gitref.cgi b/cgi-bin/gcc-gitref.cgi new file mode 100755 index 00000000..156cadb6 --- /dev/null +++ b/cgi-bin/gcc-gitref.cgi @@ -0,0 +1,42 @@ +#!/bin/sh +rel=`echo "$@" | sed -n 's/^r=r\([0-9]\+\)-[0-9]\+$/\1/p'` +cnt=`echo "$@" | sed -n 's/^r=r[0-9]\+-\([0-9]\+\)$/\1/p'` +repo=/sourceware/git/gcc.git + +ret= +if [ -n "$rel" ]; then + if [ -f /opt/rh/git19/enable ]; then + . /opt/rh/git19/enable + fi + + sha=`git --git-dir=$repo rev-parse --verify --quiet releases/gcc-$rel` + if [ -z "$sha" ]; then + sha=`git --git-dir=$repo rev-parse --verify --quiet master` + fi + if [ -n "$sha" ]; then + num=`git --git-dir=$repo describe --all --match basepoints/gcc-$rel $sha 2>/dev/null \ + | sed -n 's,^basepoints/gcc-[0-9]\+-\([0-9]\+\)-g[0-9a-f]*$,\1,p;s,^basepoints/gcc-[0-9]\+$,0,p'` + if [ -n "$num" ]; then + num=`expr $num - $cnt` + ret=`git --git-dir=$repo rev-parse --verify $sha~$num` + fi + fi +fi +if expr match "$ret" "[0-9a-f]\{7,40\}" > /dev/null; then + echo 'Content-type: text/html' + echo + echo '<html>' + echo '<meta http-equiv="Refresh" content="1; url=https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h='$ret'">' + echo '</html>' +else + echo 'Status: 400 Bad Request' + echo 'Content-type: text/html' + echo + echo '<html>' + echo '<head><title>400 Bad Request</title></head>' + echo '<body>' + echo '<h1>Error</h1>' + echo '<p>Invalid argument or could not determine git revision.</p>' + echo '</body>' + echo '</html>' +fi ----------------------------------------------------------------------- Summary of changes: cgi-bin/gcc-gitref.cgi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 cgi-bin/gcc-gitref.cgi hooks/post-receive -- gcc-wwwdocs
reply other threads:[~2020-01-13 14:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200113145411.3090.qmail@sourceware.org \ --to=jakub@gcc.gnu.org \ --cc=gcc-cvs-wwwdocs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).