Boost logo

Boost :

Subject: Re: [boost] [git] Mercurial?
From: Joel de Guzman (joel_at_[hidden])
Date: 2012-03-25 23:34:44


On 3/23/2012 4:52 PM, Daniel James wrote:
> 2012/3/23 Bjørn Roald <bjorn_at_[hidden]>:
>>
>> I have for my own boost repository used git-svn with success against
>> official boost svn. It is slow, but has worked fine for me from a kubuntu
>> box. It is slow with anything involving use of SVN, especially the clone as
>> it is actually fetching all boost history (90000 + commits), but it works.
>
> It's possible that since the point at which you created your clone,
> the boost repo crossed the line where it has became too much for
> git-svn to cope with. It's faster to create a shallow clone which only
> contains recent commits. Something like:
>
> mkdir boost
> cd boost
> git svn init https://svn.boost.org/svn/boost/trunk/
>
> # Fetch revsion 77000, and don't try to find its history.
> # This still takes a little while (not hours) and should result
> # in a copy of the specified revision. If using a different
> # revision, pick one that actually changes trunk.
> git svn fetch --no-follow-parent -r77000
>
> # Bring the clone up to date, and then rebase the repo
> # on to the latest version.
> git svn rebase
>
> This are lots of "Couldn't find revmap" errors because it's trying to
> reconcile the merge meta-data with revisions it doesn't have.

Ok, that works. Thank you, Daniel.

Now, I created a master Spirit-3 branch off this that I can
publish into, say, Github. The purpose is to allow people to
pull from and push into (those whom I give write access to)
this.

Wanting to make it modular, I searched around and found
git filter-branch. Hence, I was able to create a modular
Spirit-3 branch without the other boost libraries. All is
well until I did a downstream merge to track the changes
that's going into the Boost trunk into my Spirit-3 branch.

  boost-trunk (pull)--> spirit3

And hah! It pulls in everything (all boost libraries) again.

So, how do you do what I intend to do? All I want is to have
this repo structure:

   spirit3
     boost/spirit
     libs/spirit

that can do a merge both ways (upstream and downstream
to and from the boost trunk); needless to say, with all
the histories intact.

With SVN, it is very easy to extract sub-directories while
still tracking changes both ways to and from the source.
In Git, everything seems to be one whole global repository.
This is one thing I dislike and which SVN has better control
over: modularity. Sure, you can make many "modular" git
repositories instead of one big one like boost. But the
reality is, you don't predict up front how a library is
modularized. Spirit itself spawned at least 3 libraries
(Phoenix Wave Fusion) that stand on their own now. At one point,
in the life of a library, you may want to refactor and decouple
parts somewhere else. Doing this in Git is not straightforward
at all, unless I am missing something obviously simple (?).

I'd love to hear from the Mercurial experts as well.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk