Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Dec 2008 00:16:08 +0200
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: keeping track of local modifications
Message-ID:  <87prkbk0d3.fsf@kobe.laptop>
In-Reply-To: <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK%2B/sQ5DW5981v71UogZJPf/0> (Eygene Ryabinkin's message of "Mon, 1 Dec 2008 22:56:02 %2B0300")
References:  <4931CB02.9070904@gmail.com> <4932E8CF.9040501@freebsd.org> <49337f04.p8QqvfzTga07ypa6%perryh@pluto.rain.com> <200812010830.17259.max@love2party.net> <gFpinjQW6hEatbsT%2BXzE0kSsZf0@kjaK%2B/sQ5DW5981v71UogZJPf/0> <874p1nlslc.fsf@kobe.laptop> <8S1yocfZ0YutMO/GCIC1bN8RXQ0@kjaK%2B/sQ5DW5981v71UogZJPf/0>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 1 Dec 2008 22:56:02 +0300, Eygene Ryabinkin <rea-fbsd@codelabs.ru> wrote:
> Giorgos, good day.

Hi Eygene, thanks.  The same to you too :)

>> Git and Mercurial cannot import Subversion $FreeBSD$ lines so far,
>> and you may end up submitting patches that include unexpanded forms
>> of the "$FreeBSD: xxxx $" text.  These will fail to apply if they
>> same patch touches nearby lines.
>
> Ahm, yes.  "sed -e's|$FreeBSD: [^$]* \$|$FreeBSD$|g'" should help in
> this case.
>
> Thanks for clarification!

Having said that, I have been using a patched version of the `crew'
branch of Mercurial, for local FreeBSD work.

I didn't want to convert the *full* history of the /head branch from
Subversion, so I started by converting only the changes of 2008, using a
local Subversion mirror for speed.  The `convert' extension of Hg can
pull changesets from Subversion, using the py-subversion bindings.

An initial conversion of all the 2008 commits of the /head branch was
bootstrapped with:

    % mkdir -p /hg/bsd
    % cd /hg/bsd
    % hg convert --config convert.svn.startrev='175021' \
            --config convert.svn.trunk='head' \
            --config convert.svn.branches='' \
            --config convert.svn.tags='' \
            file:///home/svn/base/ head

After running for a while, this produced `/hg/bsd/head/.hg' which takes
about 200 MB of space now, and it includes 6600+ changesets so far:

    % hg -R /hg/bsd/head tip
    changeset:   6603:bfec3e11214e
    branch:      head
    tag:         tip
    user:        jasone
    date:        Mon Dec 01 10:20:59 2008 +0000
    summary:     Fix a lock order reversal bug that could cause deadlock during fork(2).

    %

Rerunning the same command can incrementally pull only the new changes
from Subversion, and it is fast enough that I saved it to a shell script
called `/hg/bsd/pull-head.sh' and I run it from time to time, whenever I
want to resync with 8.0-CURRENT:

    % pwd
    /hg/bsd
    % \time ./pull-head.sh
    scanning source...
    sorting...
    converting...
    10 Adjustments to make a tags file a bit more suitable to amd64.
    9 Fix fread() to return a correct value on platforms where sizeof(int) !=
    8 Catch up with the disappearance of sys/dev/hfa.
    7 Trivial patch to show on which geom has the error been detected.
    6 The times(3) function returns the number of CLK_TCKs since the
    5 import ath hal
    4 Switch to ath hal source code. Note this removes the ath_hal
    3 Fix typo.
    2 Add controller suspend/resume support.
    1 Invoke _rtld_atfork_post earlier, before we reinitialize rtld locks
    0 Add ixgbe(4) and upgt(4).
           12.06 real         3.52 user         1.42 sys
    %

It's nice to be able to use local-only operation for merging some of the
patches I have to test, so it may be useful to anyone who wants to keep
doing local FreeBSD work with Hg.  In particular, it's nice to be able
to look at the local diffs very very fast.  Once the filesystem cache is
"warmed" with the .hg/ contents of one workspace, I like being able to
see stuff like:

    % \time hg diff -r bfec3e11214e:tip > /dev/null
            1.81 real         1.30 user         0.41 sys
    %

I'll try to write to the Wiki how I keep a few local patches around,
using a clone of the converted source tree.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87prkbk0d3.fsf>