another workflow question

Stuart McGraw smcg4191 at frii.com
Wed Sep 10 16:10:39 UTC 2014


I am new to Mercurial and am having trouble figuring out a workflow
for me.  I've Googled and read a lot but perhaps because of my
limited experience actually using Mercurial I'm finding it hard to
grok what I'm reading.  Perhaps someone here could make some 
suggestions in simple terms?

I want to develop additional features for a large external project.
Most of these features will be for local use and I'll want a repo
or branch whose tip is the modified project that I use locally.
Of course I'll want to periodically merge upstream revs into this
branch to keep it up-to-date with respect to the external project.

Some, perhaps most but not all, of my local changes will be 
contributed back to the external project in the form of patch 
files against whatever is, at the time, their latest revision.

I would prefer to work within a single repo using named branches
and bookmarks rather than a bunch of separate Mercurial repositories.
I would prefer not to use mq (since I find Mercurial alone difficult
enough and mq seems completely opaque.)
 
I'm thinking that I want to clone the external project's repo, and 
in my copy use a branch named "upstream" to pull upstream changes 
into.  In another branch, say "local", and branches thereof, I'll
do my feature development, merging back into "local" which will
provide the version of the project I'll use locally.  And I'll
periodically merge in changes from "upstream".  What I'm not
clear about is if I develop a feature named "foo" and merge into
my local branch at rev 1060 (which also contains upstream rev 1050), 
how do I later generate a patch for only this feature against 
rev 1080 of the upstream?  I hope my question make at least a 
little sense. 



More information about the Mercurial mailing list