This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GIT: Monotonically increasing trunk and release branch ids


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]