Create patch for series of existing changesets that were created without using MQ?

Matt Mackall mpm at selenic.com
Wed Apr 27 18:25:39 UTC 2016


On Wed, 2016-04-27 at 20:47 +0300, Grigory Ptashko wrote:
> > 
> > On 27 апр. 2016 г., at 20:35, Matt Mackall <mpm at selenic.com> wrote:
> > 
> > On Wed, 2016-04-27 at 19:45 +0300, Grigory Ptashko wrote:
> > > 
> > > Hello.
> > > 
> > > I've recently started to work on an open source project which uses
> > > Mercurial.
> > > I'm a new user to Mercurial, so I read the HG book and started working. My
> > > goal was to write code and always pull and merge changes from the upstream
> > > so
> > > I can stay up-to-date. The area that I am working on is also under heavy
> > > development by others so I do want to merge my changes after a long period
> > > of
> > > time. I cloned a repo. So, my workflow is like this:
> > > 
> > > 	• I created a bookmark mybook
> > > 	• hg up mybook
> > No need for this step.
> I’ve chosen bookmarks

No, you literally do not need to type "hg up mybook" after "hg book mybook". The
first command creates the bookmark and makes it active. The second command has
no effect at all.

But strictly speaking, you also don't need the bookmark either. You can just
commit a change. It won't have a distinct name ("anonymous branch"), but it'll
still be a distinct topological branch that you can find with "hg log -G" or "hg
heads".

>  because in the project manifest it is said that there must not be
> named branches. But I wanted to have my own local branch to which I can commit
> and then
> when I am ready merge my changes to upstream.
> But now I understand that I’m doing something wrong..

The only thing you're doing "wrong" is merging upstream into your branch. It's
much easier to manage a linear feature branch with no merges, in particular
because it allows you to cleanly export patches. Rebase (or mq) will let you
move your linear feature branch to the tip after you pull.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list