On 2007-06-20 21:09, Vladimir Marek <[EMAIL PROTECTED]> wrote:
> [...]
> > (At least in teamware, that doesn't involve actual 'reparenting', as
> > you can specify to pull from _any_ workspace.)
>
> Hmm, looking at 'hg help pull', Mercurial is supposed to do that also.

Yes, indeed.

You can even pull from 'bundles'.  I often update Mercurial itself by
pulling into my local mercurial/crew source tree with:

    % cd ~/hg/mercurial/crew
    % hg paths selenic
    http://hg.intevation.org/mercurial/crew
    % hg incoming --bundle /tmp/crew.hg selenic

Now the /tmp/crew.hg bundle can be pulled into a test workspace:

    % cd ~/hg/mercurial
    % hg clone crew crew-test
    % cd crew-test && hg pull -u /tmp/crew.hg

Then the regression tests can be run for the test workspace with my
local wrapper around Mercurial's `run-tests.py':

    % cd ~/cron.d
    % env GATEREPO=$HOME/hg/mercurial/crew-test \
          sh mercurial-test.sh

Finally, if all the tests have passed, I pull from 'crew-test' into
'crew' and this is my new 'crew' snapshot :)

Setting the 'default' path in .hg/hgrc of a workspace is not necessary
for pulling from arbitrary workspaces, as long as the workspaces have at
least *some* common part of their history graph.

> One last thing which came to my mind. If you do several merges at "merge
> workspace", you will want to do final putback to "master workspace".
> For this might be nice to collapse all the submerges into one changeset.
>
> hg diff -r BASE -r tip > merge.diff
> hg strip -r BASE+1
> gpathch < merge.diff
> hg ci ...
> hg push ...

Yeah, this is pretty much all of it :)

If you pick as 'BASE' the head of the remote workspace (it should be one
of the parents of the current 'tip' revision), and you use the --git
option of 'hg diff' you can even collapse renames, and file copies.

_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to