Re: git tools for building in base?

From: Ulrich Spörlein <uqs_at_freebsd.org>
Date: Wed, 23 Dec 2020 13:54:00 +0100
On Fri, 2020-12-18 at 14:02:08 +0100, Miroslav Lachman wrote:
>On 25/11/2020 06:54, Thomas Mueller wrote:
>
>> NetBSD users face a similar problem with their upcoming switch from cvs to hg (Mercurial).
>
>Do anybody have a link to some documents stating why FreeBSD chose Git
>and why NetBSD chose Mercurial? I am using both tools at $WORK, I am
>just curious what leads to these decisions.

No documents, but git was simply more mature back when I started this 
effort a decade ago and it is and was more popular (with all the added 
side effects that has). I was (and am) only an occasional user of hg and 
even git, so familiarity wasn't quite an argument back then, though the 
git storage model is much nicer for the required history re-writing.

In the early days I pushed to googlecode and bitbucket as well, you can 
see that here 
https://svnweb.freebsd.org/base/user/uqs/git_conv/git_conv?r1=251786&r2=251785&pathrev=251786

Not visible are the trials I ran with git-svn and hg, both of which only 
could handle the single head branch, but not all the other branching 
craziness that was and is going on in the repo.

I don't fully recall, but I think that the hg conversion was slow and 
the disk space needed was quite a bit more than git.

So in summary, I guess it can be summed up as:
- there was no svn-all-fast-export for hg back then
- even bitbucket switched from hg to git
- history rewriting is easier in git, see e.g. this file for the stuff 
   that's required to make the cvs2svn things a bit nicer: 
   https://github.com/freebsd/git_conv/blob/master/fix_bogus_tags.sh

Granted, now that the heavy lifting is done, one could probably do a 
git2hg transition, as the history is now pretty sane and should be 
compatible to the hg model.

But lack of anyone (to my knowledge?) providing a hg copy of FreeBSD all 
these years tells me that there's simply no demand for it.

There's https://wiki.freebsd.org/LocalMercurial from 2008 but that skips 
converting from r1. Of interest is also 
https://www.mercurial-scm.org/pipermail/mercurial/2019-May/051240.html 
which looks like the size issues with hg haven't been fixed yet. It also 
seems that http://hg-beta.freebsd.org/base/branches has the 
user-servicable branches only, but not vendor. So it's not usable as a 
source-of-truth for the project.

I would encourage everyone *not* to base their hg work off of SVN but 
take the soon-official git repo instead. If you wanted to do this right 
off of SVN, here's just one of dozens of quirks: 
https://github.com/freebsd/git_conv/blob/master/revisions.md

You've been warned ;]

Cheers
Uli
Received on Wed Dec 23 2020 - 11:54:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC