Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 2009 14:05:50 +0400
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        hackers@freebsd.org
Subject:   Re: distributed scm+freebsd svn?
Message-ID:  <20090727140550.585aa384.stas@FreeBSD.org>
In-Reply-To: <20090726231534.GI21885@elvis.mu.org>
References:  <20090726231534.GI21885@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Mon__27_Jul_2009_14_05_50_+0400_cdipQ9bF.P8+olX3
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, 26 Jul 2009 16:15:34 -0700
Alfred Perlstein <alfred@freebsd.org> mentioned:

> Hello hackers,
>=20
> Does anyone here use one of the distributed SCMs
> to manage contributions to FreeBSD in an easy
> manner?
>=20
> Any pointers to a setup you have?
>=20
> I thought "git" was supposed to make this easy, but
> going over the docs leaves me with a lot of questions.
>=20
> I'm hoping to be able to basically:
>   sync into my "distributed repo".
>   allow a third party access to it.
>   easily commit upstream back into svn from a branch
>     in my distributed scm.
>

Hi, Alfred!

As far as I know there's a lot of people in the communtity
use distributed SCMs to work with FreeBSD repo: both git
and mercurial are popular.  I only used mercurial so I can
share my experience only on this SCM.

Since I started using it (about 2 years ago) I explored a number
of possible ways to keep my repo in sync with FreeBSD one
to make merges easier starting from hourly syncs by simple
"cvsup + hg commit" (outlined at wiki) and ending by full
repository conversions. Luckily enough after switch to subversion
it is now possibleto convert the full repo with all history both
to git and hg without much problem.  Currently I'm using the Hg
convert extentsion bundled into the default mercurial install.
I made the result of conversion available here:
http://repoman.deglitch.com/bsdhg/FreeBSD/base/
It is updated regularly (every 15 minutes) from the local svn mirror.
The size of converted repo is about 885 MiB (with all known branches and
tags and entire history).
=20
Some points to note if you will try do the initial conversion yourself:
1) Use memory disk for repository storage.  That will spedup things a
  lot (an order of magnitude).
2) Hg convert extension expect the default svn layout (i.e. trunk/ for
  head, tags/ for tags and branches/ for branches).  FreeBSD doesn't follow
  this layout so I had to tweak the application by hand to allow it to found
  our branches.  It is possible to use command line switches to point it
  to your trunk, tags and branches location, but as we effectively have two
  root-level folders for branches (stable/ and releng/) it doesn't work wel=
l,
  so I had to add yet one switch to point to another branches folder.
3) Using local svn mirror is usually preferrable for performance matters.

For development I usually do a branch clone (either from "head" branch,
or some "stable" branch depending what I'm going to work on) by "hg
clone" command and then do my work in that branch (ordiary commit/pull/push
workflow, nothing specific).  Whenever I need to sync with head I do
a pull from the parent branch (e.g. hg pull -r head
ssh://stas@repoman.deglitch.com/bsdhg/FreeBSD/base/) and then hg merge -r
head.  This works like a charm for any kind of work I do.  When there's
a need to get a diff between the stock FreeBSD tree and you tree you can
achieve this by using hg diff -r "youbranch" -r "head".  I do not perform
commits directly from mercurial, but there're extensions to do this, afaik.
This just doesn't sound useful much for me.

Access to 3rd party users can be granted the same way it is done in other
source control systems.  I prefer the plain ssh access for this task by
configuring a jail with repository access and creating users accounts
with limited access and the special wrapper instead of login shell which
allows execution of the limited set of commands.  Today such kind of shell
is already included into the distribution so there's no need to hack up
your own version.=20

--=20
Stanislav Sedov
ST4096-RIPE

--Signature=_Mon__27_Jul_2009_14_05_50_+0400_cdipQ9bF.P8+olX3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJKbXwCAAoJEKN82nOYvCd08acP/0lKkNzGwaVxFvvA+kaxl64o
vXWfbne1phMMBfEQ3eWXDk8hDWmjnuQwbLXcE3dW4VqUD3ITwTTdfoJ998sPDQ5p
qU0+2Y+sVyiAsgu3mxoeiuHr4qZZMXFrKQU9w37IV8+EFAgngJ7HuqybiMEUS0ds
aLh1CY9DjoELaMnLoTwK/e8Fy0bLycWljVU0ncOVfYZmLCgjBmayMzeWhJ8JrWkY
wnPs9C91Nib/HN7ZlUxc2PQr6EJNwkzmBLsWoC0vmeMixuf9VwrN3E5xYd9VJnDC
OLNVg3+5790oZSCSgo7+NcP3R/skyAJetoNjhf6v2gXd9uoJseG8BJVMWV+X5HTe
6qes9xfs6Vw44VsUqy1aS+V/tYNl70smoMmgq4YH6bi0iCaaYLJMDYj/zk+mRGd1
NvcZ4mHEuat00P0Msjzbrr7icJd3ScYkhOqorRigsHjW3q7imua1rjcuve7Ep0JB
5c08oRGlzUKkCamNk8Rum8g0w/nWzQVb6PDAP6SsTiIzpwMXuSOYxyPmpdUWfj1c
y4Bp/3eRK7gocjnkarQ3+7xXQsHEEzFihRlyz/LeRrrjSezWKWP2E6xAvWwcJKSF
ig6cWIZcWnUizGtBzAPhJ6+nE5juYDSGepXixBGErdDCIxL+9yTMObe2A1G+ODS8
vhKrdA40dSjhJCJcym1j
=lAzV
-----END PGP SIGNATURE-----

--Signature=_Mon__27_Jul_2009_14_05_50_+0400_cdipQ9bF.P8+olX3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090727140550.585aa384.stas>