Hi Björn, *,

On Tue, Oct 27, 2009 at 11:37 AM, bjoern michaelsen - Sun Microsystems
- Hamburg Germany <[email protected]> wrote:
> 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,

Well, RE doesn't need to support it anyway. One needs to be aware of
it, that's all.
If you're consumer only, then you don't need to take care anyway, only
if you are a developer and need to commit stuff, then you should
remember that you're having multiple heads and that only the one
you're working on is meant to be pushed.
Pushing the other ones doesn't do any harm besides wasting bandwidth on a push.

> 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.

It doesn't even take more diskspace. A hg workingdir: ~3.5GB - a
subversion working dir: 4,4 GB

A local clone doesn't take up noteworthy diskspace - only the actual
sourcefiles matter (~2.1GB)
But as you got the whole repo locally anyway, throwing away those 2.1
GB to make room for the other tree is cheap. No bandwidth needed, just
a little I/O on your harddisk.

Again: Cloning the local repo is fast.
$ hg --time clone -U OOo-tip hgclone
Time: real 2.140 secs (user 0.770+0.000 sys 1.130+0.000)
$ cd hgclone/
$ hg --time update -r DEV300_m61
68960 files updated, 0 files merged, 0 files removed, 0 files unresolved
Time: real 59.220 secs (user 41.670+0.000 sys 7.580+0.000)
$ cd ..
$ time rm -rf hgclone/

real    0m1.551s
user    0m0.100s
sys     0m1.450s

svn switch doesn't even come close to that.

So: Don't try to force your working habits to mercurial, better try to
adapt your workflow to use the benefits of mercurial.

> 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(*) ;-)

...instead just use hg push -r tip, to only push the head you're
actually working on.
That way no bandwidth is wasted pushing unrelated branches/heads and
no confusion is caused by introducing another head in the cws.

ciao
Christian

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

Reply via email to