This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GIT: Monotonically increasing trunk and release branch ids
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jonathan Wakely <jwakely at redhat dot com>, gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Sat, 11 Jan 2020 12:28:01 +0100
- Subject: Re: GIT: Monotonically increasing trunk and release branch ids
- References: <20200110163852.GV10088@tucnak> <CADzB+2=U=WBqu7uc37UrW_YOt45eOKEKhz=Fdg9vwUN1NGY8kQ@mail.gmail.com> <20200110214747.GD10088@tucnak>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jan 10, 2020 at 10:47:47PM +0100, Jakub Jelinek wrote:
> Ah, you suggested g: rather than just g.
> We could then support
> rNNNNN (1-6 decimal digits) - the svn revs, either for old repo, or transformed
> g:XXXXX (X is any [0-9a-zA-Z_-], something else?, 1 or more chars) - gitweb with XXXXX
> rNN-MMMMM (1-2 decimal digits, 1-6 decimal digits) - git undescr to hash
> rNN-MMMMM-gXXXXX (perhaps limit X to hashes here, i.e. 7-40 hex digits) - gitweb with XXXXX
> both in bugzilla and in the redirectors.
For the redirectors, it could be something like following patch, except the
last new redirect would need also a yet to be written cgi script that would
git undescr the argument and print
Location: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=...
--- /etc/httpd/conf.d/sourceware-vhost-gcc.include 2019-11-21 19:25:03.172399228 +0000
+++ /etc/httpd/conf.d/sourceware-vhost-gcc.include 2020-01-11 11:22:00.752261787 +0000
@@ -59,6 +59,11 @@
# Support short URLs for referring to SVN revisions.
RedirectMatch ^/r([0-9]+)$ https://gcc.gnu.org/viewcvs/gcc?view=revision\&revision=$1
+ # Similarly for GIT commits.
+ RedirectMatch ^/g:([0-9a-zA-Z._{}~^-]+)$ https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=$1
+ RedirectMatch ^/r[0-9]+-[0-9]+-g([0-9a-f]+)$ https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=$1
+ RedirectMatch ^/(r[0-9]+-[0-9]+)$ https://gcc.gnu.org/cgi-bin/gcc-gitref.cgi?r=$1
+
# ViewCVS setup
RewriteRule ^/cgi-bin/cvsweb.cgi https://gcc.gnu.org/viewvc/gcc [L]
Jakub