Partial merge (or maybe cherry picking)?
Matt Mackall
mpm at selenic.com
Wed Mar 4 12:59:42 CST 2009
On Wed, 2009-03-04 at 13:02 -0500, Benjamin Pollack wrote:
> On 3/4/09 11:46 AM, Frank Hu wrote:
> > I don't know if "partial merge" is the right term to describe my
> > problem. I have a project, say with source files a.c, b.c and c.c,
> > and I branched out to try some new features, mostly modifying a.c and
> > b.c. So I have the default branch and the feature branch (named
> > branch in the repo). At some point, I found a bug in c.c,say at
> > revision 10, and fixed it. Now I'd like the default branch to have
> > the fixed c.c too. Is there an easy way to do that? I don't want to
> > merge the two branches, because a.c and b.c are significantly
> > different between the two branches. I guess I could do an update and
> > a revert in the default branch, but is there anything else I can do?
> >
>
> There are two things you can do:
You forgot the simplest thing:
hg co <target branch>
hg export -g <bugfix revision> | hg import -
Some call this "cherrypicking".
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial
mailing list