views:

73

answers:

2

Let's say I have the following workflow with Mercurial:

stable (clone on server)
    default (branch)
    development (clone on server)
        default (branch)
        bugs (branch)
            developer1 (clone on local machine)
            developer2 (clone on local machine)
            developer3 (clone on local machine)
        feature1 (branch)
            developer3 (clone on local machine)
        feature2 (branch)
            developer1 (clone on local machine)
            developer2 (clone on local machine)

My main line of development which is always in a release ready state is 'default'. So the 'default' branch in the 'development' clone is always release-ready.

Now suppose I'm developer1 working on feature2. And let's say also that feature2 takes several months.

It's pretty obvious that I'm going to want to keep my 'feature2' branch up to date with the 'default' branch. Does this make sense? How would I go about doing this with Mercurial?

+2  A: 

It seems obvious to me - there might be other subtleties I don't see; merge in the latest changes from default.

Paul Nathan
+1  A: 

You should just be able to pull from default to feature2, unless there is some additional complexity I'm missing?

sjohnston
Great. I'm new to Mercurial; what is the command to do this? Both 'default' and 'feature2' are each branches. I know how to pull from a parent repository, but how do I pull/merge from the 'default' branch into the 'feature2' branch?
Chad Johnson
Okay, figured it out. I just do this: 1) hg update -c feature2 2) hg merge -r default
Chad Johnson