keeping track of local modifications
keramida at freebsd.org
Mon Dec 1 14:16:28 PST 2008
On Mon, 1 Dec 2008 22:56:02 +0300, Eygene Ryabinkin <rea-fbsd at 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
% 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='' \
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
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:
% \time ./pull-head.sh
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.
More information about the freebsd-hackers