[Numpy-discussion] DVCS at PyCon

David Cournapeau cournape at gmail.com
Mon Apr 13 09:03:40 EDT 2009


On Mon, Apr 13, 2009 at 6:22 PM, Martin Geisler <mg at lazybytes.net> wrote:

>
>  hg diff -r F -r tip
>
> where 'tip' is a built-in name that always point to the newest revision
> in a repository. If you have a bookmark named 'numpy-1.2.x' on F you
> could write:
>
>  hg diff -r numpy-1.2.x -r tip

Ok, so bookmarks are like named branches in that regard. But what if
they happened to be in different repositories ? If you have two
clones, how do you refer one clone from the other ? That's where bzr
UI for branch handling broke IMHO, so I was wondering about hg ?

>
> As for cherry-picking the recommended way (in both Git and Mercurial, as
> far as I know) is to do the commit on the oldest relevant branch and
> then merge this branch into younger branches and finally into the
> mainline. This way each branch is a strict subset of the next branch,
> and mainline contains all commits on all branches.
>
> But of course one might realise too late that a changeset on mainline
> should have been made on, say, the 1.3.x branch. In case one can apply
> the change as a new changeset by exporting it from mainline and
> importing it on 1.3.x:
>
>  hg export tip > tip.patch
>  hg update -C 1.3.x
>  hg import tip.patch
>
> The transplant extension for Mercurial can help with this, probably with
> better handling of merges, but I don't have any real experience with it.

Ok.

>
> The bookmarks is a convenience layer on top of the basic functionality
> in Mercurial. They let you attach a name to a changeset just like a tag,
> but unlike tags the names move around: if you make a commit based on a
> changeset F with 'numpy-1.3.x', the child changeset will now have the
> bookmark 'numpy-1.3.x'. This way bookmarks become moveable pointers into
> the history, similarly to how Git heads point to changesets in the
> history.
>
> At the moment, bookmarks are even local to a repository, but it is
> planned to add support for looking them up remotely and for transferring
> them on push/pull. But right now you cannot tell if I'm using bookmarks
> to keep track of the heads in my clone.

So it means that we would have to keep clones for each branch on the
server at the moment, right ? Can I import this into bookmarks ? Say,
we have three numpy branches on scipy.org:

numpy-mainline
numpy-1.2.x
numpy-1.3.x

and I want to keep everything into one repository, each branch being
bookmark. It looks like it is possible internally from my
understanding on how it works in hg, but does the UI supports it ?

David



More information about the NumPy-Discussion mailing list