[PATCH]mq:a patch stores

Chris Mason mason at suse.com
Thu Sep 15 07:17:30 CDT 2005


On Thu, 15 Sep 2005 14:23:28 +0800
Xiaofeng Ling <xiaofeng.ling at intel.com> wrote:
> > 
> > 1) hg checkout -C A
> > 2) hg qpush -a
> > 3) hg checkout -C B
> > 4) mkdir .hg/tmppatches
> > 5) for each revision from hg qapplied -v
> >        hg update -m revision
> >        hg commit -m 'merge with revision:patchname'
> >        diff from tip to parent in B head
> >        Create patch in .hg/tmppatches (preserving comments)
> > 
> > Once all revisions are merged, strip away all the new revisions from
> > heads A and B, and copy patches from .hg/tmppatches
> > into .hg/patches. While merging each patch, there might be patches
> > that already exist in some form in rev B, so there needs to be a
> > prompt about keeping a given revision once the merge is done.
> As I'm not familiar  with python, I wrote a shell script to do as
> your description at first, it works for me now.
> But I notice by your way, there is two limitations
> 1. we can not get correct result if the first ancestor of patch series
> is not the ancestor of new base revision
> 1-2-3-5-6
>    |  \4
>    7
> 5,6 is our mq managed patches, if we want to rebase 5,6 to 7
> by this way, 3 will also be merged to 8, not only 5.

Yeah, I actually tried it after sending the email.  hg update -m didn't
work exactly the way I expected, so I think we'll have to run the merge
program manually on a out temporary file.  But, the system of doing
things in to heads is still valid.

-chris


More information about the Mercurial mailing list