what do I need to learn to do this task?

Michael Mossey michaelmossey at gmail.com
Tue May 13 06:04:57 UTC 2014


On 5/12/2014 10:23 PM, Dave S wrote:
>
>
> This differs from your current workflow at the point where you want to 
> bring some of those changes into the "official" branch/repo.  At that 
> point, you will do a merge to pick the right mix of "official" and 
> "alternate"   (Sidenote:  in the book, and in many descriptions here 
> on the mailing list, you'll see the names "default" and "development" 
> for what I called "official" and "alternate"; sometimes "feature-name" 
> instead of "development" or "alternate", especially if "default" is 
> also used for less-experimental code development).  Doing a merge is a 
> natural thing in Mercurial, and there's lots of good descriptions of 
> how to do it.
>
> You will also be doing merges from "official" to "alternate" 
> ("default" to "feature-name") when the code changes in that line of 
> work are needed in your code base.
>
> I know that I'm being a bit hand-wavy about this, but I think at I'm 
> at about the right level ("2000 ft view") for your question about 
> workflow.  If you find you need help with the details, fire back with 
> more questions.
>

I'm in chapter 3 of the book so I'm learning about merging. Also, I used 
Perforce in a large company a few years back so I've done 3-way merges 
before.

I just need a couple more specifics. So would this be right?

- I have a repository "official" on my local machine, and also on Bitbucket

- I have a repository "alternate" on my local machine, and also on Bitbucket

I do most of my work in "alternate", using Bitbucket to push and pull 
changes between desktop/laptop.

When I am ready to commit something to "official", I cd to "official" 
and do hg pull from "alternate". This will result in the need for a 
merge. I am confident I can do merges and get what I want. But will it 
also bring in all the little meaningless changesets?

- one important question: in preparing for a merge, is it generally 
simple to pull into the repo where you want to do the merge, rather than 
push into it? In my own experimentation I tried pushing some conflicting 
changes into a repo and doing a merge, and I ended up with a confusing 
state in the repo--some reference to branches I didn't understand, and 
never could get the changes actually merged. So I have decided to stick 
with pulling rather than pushing

- Every once in a while I update "official" with changes from the other 
developer on this project, doing a merge if necessary, and then switch 
to "alternate" and pull them in, doing a merge if necessary.

Mike





More information about the Mercurial mailing list