On Tue, 27 Oct 2009 10:58:53 +0100 "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 This is certainly possible with hg. However, to use this functionality you would need multiple heads in one repository. Since this is _not_ currently supported by releng, you are completely on your own when doing so. If you are a not yet too confident in using hg, just use multiple repositories: It uses a bit more disc space, but will likely have break-even by not breaking your repos once. Anyway, here we go (totally unsupported by releng): > 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 (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. Could > someone give me the Mercurial equivalent to the following sequence of > instructions: > > svn co http://svn.services.openoffice.org/ooo/trunk/ > cd trunk $ mkdir local_DEV300 $ cd local_DEV300 $ hg init $ hg unbundle <path_to_bundle>/DEV300.hg > svn switch http://svn.services.openoffice.org/ooo/cws/blabla > # Now the current directory contains the OOo sources for CWS blabla hg pull CWS-URL hg up --clean (or hg up --clean -r last_cws_changeset) # Be really careful with --clean. Read the update help carefully! # last_cws_changeset is easily tracked with the bookmarks extension > svn switch http://svn.services.openoffice.org/ooo/tags/OOO320_m2/ hg up --clean -r OOO320_m2 # Be really careful with --clean. Read the update help carefully! # last_cws_changeset is easily tracked with the bookmarks extension > # 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. > svn switch http://svn.services.openoffice.org/ooo/trunk/ hg up --clean -r last_DEV300_changeset # Be really careful with --clean. Read the update help carefully! # last_cws_changeset is easily tracked with the bookmarks extension > # 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. As shown, theres a way to do that. However, this local repository now contains multiple heads. Do NOT DARE to "hg push --force" these multiple heads to an outgoing repository or the wrath of RelEng will be upon you. You have been warned(*) ;-) Best Regards, Bjoern (*) At least twice, as the docs say this pretty clearly at: http://wiki.services.openoffice.org/wiki/MercurialCws#Publishing_changes -- =========================================================================== Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Haering =========================================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
