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 Sat, Jan 11, 2020 at 12:28:01PM +0100, Jakub Jelinek wrote:
> 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]
> 

And the cgi script could be something like (after the basepoints tags would
be pushed to upstream) attached, tested by hand against my copy of the
converted repo with:
$ git tag -l | grep basepoints
basepoints/gcc-0
basepoints/gcc-10
basepoints/gcc-5
basepoints/gcc-6
basepoints/gcc-7
basepoints/gcc-8
basepoints/gcc-9
$ for i in 0 `seq 5 10`; do echo -n basepoints/gcc-$i" "; git log basepoints/gcc-$i --max-count=1 | head -n 1; done
basepoints/gcc-0 commit 6f39d4ff6715973bbdf6510a69fccc46f9a746b9
basepoints/gcc-5 commit 89eb97de15f1618bd63b6138e8a5536b935861e8
basepoints/gcc-6 commit 1a46d358050cf6964df0d8ceaffafd0cc88539b2
basepoints/gcc-7 commit 70f4fdeb67fe065041a52304bb20f6ce701b1cf7
basepoints/gcc-8 commit aa90195aedfa348284c6e4e8ce59dc1b734f1d71
basepoints/gcc-9 commit 3bedd3463137d0712b72d582836a0b14c74ef620
basepoints/gcc-10 commit 68ec60c4a377b532ec2d265ea542107c36b1d15c

	Jakub

Attachment: gcc-gitref.cgi
Description: Text document


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