From owner-freebsd-git@freebsd.org Sat Jul 11 09:41:50 2020 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15F4935CAEF for ; Sat, 11 Jul 2020 09:41:50 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3lL56hzGz3Ryq for ; Sat, 11 Jul 2020 09:41:49 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id E421535D307; Sat, 11 Jul 2020 09:41:49 +0000 (UTC) Delivered-To: git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3DF135CF53 for ; Sat, 11 Jul 2020 09:41:49 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a05:fc87:1:5::15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.spoerlein.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3lL53cLXz3S2T for ; Sat, 11 Jul 2020 09:41:49 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from localhost (acme.spoerlein.net [IPv6:2a05:fc87:1:5:0:0:0:15]) by acme.spoerlein.net (8.15.2/8.15.2) with ESMTPS id 06B9fkZI016779 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 11 Jul 2020 11:41:47 +0200 (CEST) (envelope-from uqs@freebsd.org) Date: Sat, 11 Jul 2020 11:41:46 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Dan Langille Cc: git@freebsd.org Subject: Re: What happens to old repo links? Message-ID: <20200711094146.GB16439@acme.spoerlein.net> References: <8B5D0824-F412-4067-B874-21F2EA6EAEE6@langille.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8B5D0824-F412-4067-B874-21F2EA6EAEE6@langille.org> User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 4B3lL53cLXz3S2T X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:39540, ipnet:2a05:fc87::/32, country:CH]; local_wl_from(0.00)[freebsd.org] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 09:41:50 -0000 On Fri, 2020-07-10 at 20:52:35 -0400, Dan Langille wrote: > Hello, > > At present, we have links to old commits, such as: https://svnweb.freebsd.org/ports/head/graphics/mesa-devel/Makefile?annotate=537860 > > In git, how will that work? How will we get to revision 537860? > > Similarly, for https://svnweb.freebsd.org/ports?view=revision&revision=537860 > > How will that work? > > Thank you. Someone will have to write a redirector that greps in the notes for the hash of the corresponding SVN revision. Note that not all SVN revs are present in git as such, as they might not make sense and have been skipped. % git log --notes --grep=revision=537860\$ master commit 69116835276115e2dbec1332f2070300e4905d76 Author: Jan Beich Date: 2020-06-04 00:49:09 +0000 graphics/mesa-devel: update to 20.1.b.1495 Changes: https://gitlab.freedesktop.org/mesa/mesa/-/compare/fb62e642ae6...8252bb0ec6d Notes: svn path=/head/; revision=537860 So the redirector needs to run: % git log --format=%H --notes --grep=revision=537860\$ master 69116835276115e2dbec1332f2070300e4905d76 and 301 to https://cgit-beta.freebsd.org/ports/commit/?id=69116835276115e2dbec1332f2070300e4905d76 or https://cgit-beta.freebsd.org/ports/diff/graphics/mesa-devel/Makefile?id=69116835276115e2dbec1332f2070300e4905d76 depending on a file path being present or whatever. If a plugin in gitolite could do that translation, that would be great. hth Uli