Hi Matthias,

On Tue, Oct 27, 2009 at 10:58 AM, Matthias B. <[email protected]> wrote:
> Maybe I've overlooked it but I haven't seen an equivalent to
>
> svn switch URL-of-CWS-or-tag
>
> With svn I had one checkout which I switched to whatever cws or tag I
> wanted to build and svn switch would only download the differences
> between my current checkout and the target. That was fast, saved
> bandwidth and hard drive space

No, that wasn't really fast (IMHO).

> (believe it or not, I have to make do
> with an 80GB hard disk). With Mercurial it looks like I have to clone
> a complete repository whenever I want to build a CWS or a tag.

If you want to have it in seperate directories: Yes, but you're
cloning from your local repo anyway. And when you do it as described
in the wiki-pages, mercurial will use hardlinks for the clone.

This is /very/ fast and also needs virtually no additional space for the repo.

> Could
> someone give me the Mercurial equivalent to the following sequence of
> instructions:
>
> svn co http://svn.services.openoffice.org/ooo/trunk/

hg clone -U http://hg.services.openoffice.org/DEV300 OOo-repo

> cd trunk
>
> svn switch http://svn.services.openoffice.org/ooo/cws/blabla

hg clone -U OOo-repo workdir
cd workdir
hg pull -u http://hg.services.openoffice.org/cws/blabla

Alternatively you can pull to your local-"master"

> # Now the current directory contains the OOo sources for CWS blabla
>
> svn switch http://svn.services.openoffice.org/ooo/tags/OOO320_m2/
> # Now the current directory contains the OOo sources for milestone OOO320_m2
> # NOTE: The changes from CWS blabla are NOT merged. Unless they have
> been incorporated in m2 by
> # the OOo developers, they are gone now from my checkout.
> # This is an important point. I am NOT looking for a way to merge
> changes from different trees.

just the same as above, although then you wouldn't need to pull since
the milestones would be tagged in the main repo already. hg update -C
(thorw away your local changes) -r OOO320_m2)

> svn switch http://svn.services.openoffice.org/ooo/trunk/
> # Now my repository is exactly as it was in the beginnig (assuming no
> commits happened in the mean time)
>
> As mentioned in the beginning, I'm interested in a way of doing this
> that is fast, bandwidth-efficient and diskspace-efficient.

Mercurial is way, way faster than svn in this regard.
If fact with mercurial, I wouldn't bother modifying the existing tree,
but just create another local clone.

Remember to always clone the full repo (no -r argument), otherwise
mercurial cannot use hardlinks (would be slow and takes much
diskspace)

ciao
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to