incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens-Heiner Rechtien <jhrecht...@web.de>
Subject Re: Building a single Hg repository (was: An svn question)
Date Wed, 29 Jun 2011 12:26:48 GMT
Hi Greg,

On 06/29/2011 05:27 AM, Greg Stein wrote:
> On Mon, Jun 27, 2011 at 05:42, Jens-Heiner Rechtien<jhrechtien@web.de>  wrote:
>> On 06/27/2011 01:08 AM, Greg Stein wrote:
>> ...
>>>> Merging them in hg is easy, just pull/merge. But ... we are talking about
>>>> a
>>>> hundred or so CWSs here. In all kinds of readiness states.
>>>> http://hg.services.openoffice.org
>>>>
>>>> If we merge them now, we won't have a working OOo for a long time. Now,
>>>> we
>>>> could skip the merge part and leave the heads "dangling". Hg heads are
>>>> kinda
>>>
>>> That's what I was thinking. And then map these "dangling" heads to
>>> individual branches in svn.
>>>
>>>> anonymous branches in Mercurial. Don't know if a repository with multiple
>>>> heads can be converted to SVN. Probably quite tricky (the tool would need
>>>> to
>>>> generate sensible names for the different heads).
>>>
>>> If the converter tool doesn't have the feature, it seems pretty
>>> straight-forward to add code to either provide a name mapping for
>>> them, or auto-generate names.
>>
>> The anonymous heads could be marked with the cws name as a mercurial
>> bookmark, just after the individual pull step. That way the information is
>> at least already in the all-in-one hg repository. A smart converter could
>> use them to generate svn branch names. Something along this lines:
>>
>> $ cd<all-in-one-respository>
>> $ hg pull ../cws/os151
>>
>> ... the latest changeset of CWS os151 is now tip
>>
>> $ hg bookmark -r tip os151
>>
>> $ hg bookmarks
>>    os151                     276718:f4d674e63830
>>    ....
>
> Great. Thanks for the pointers.
>
> I'm going to start updating the single-hg.sh (see tools/dev/) with
> this stuff. I'd appreciate if you could keep an eye on the commits and
> correct me where I stray. I've never used Mercurial before.

Will do.

>
> I've read up on the difference between: tags, branches, local tags,
> and bookmarks. I agree that it seems bookmarks are appropriate for
> this purpose. We could technically use a tag since no further work
> would be done in this "single" repository. However, we may be able to
> use the bookmarks as an indicator for branch construction (vs a static
> copy in tags/).
>
> I suspect that a lot of work will happen on the Convert extension to
> Mercurial to manage this transition :-)
>
> One more thing... I cloned one of the CWSs (ab78), and it was 2.8 Gb.
> My clone of DEV300 is 3.5 Gb. Is the size of that CWS typical? There
> are about 250 CWSs hosted at OOo. If the average holds, I would need
> to clone 700 Gb of material down to my system to perform the
> integration.

Several posters already answered this one, just let me add that the 
first 263206 revisions on all repositories are guaranteed identical, no 
need to ever download them twice over the wire. Actually almost all the 
open CWSs contain only very few new changesets, and that's all you need 
to pull.

If you got a copy of DEV300 or OOO340 on your system you could either 
pull all the stuff in one repository resulting in having one head per 
CWS or create one repository per CWS with:

$ hg clone -U DEV300 <foo>   <- uses hardlinks on Unix
$ cd foo
$ hg pull .../cws/<foo

Which approach is better depends on how you want to proceed.

The OOo mercurial server hg.services.openoffice.org keeps all the 
currently open CWSs in less than 400 GB diskspace, but there hardlinks 
are only used during CWS creation. With perfect hardlinking it will be 
significantly less. An all in one repository will be around 2.5 GiB plus 
1.7 GiB or so for the working tree.

Heiner

-- 
Jens-Heiner Rechtien

Mime
View raw message