merging selective changes from merge directive patch file.

Niben M Singh niben_s at
Wed May 27 18:31:04 BST 2009

Thanks John and Martin!

This leads me to another question. If I am to merge a merge-directive (that may contain several change sets), is there an easy way to commit using the original comments and author? It seems after reviewing every patches, I need to add my own comments while committing and it will also list me as the author of the commit. I understand the log will show both, but it does not make sense to me to repeat the original comment while committing a patch after review.

"bzr pull" does that but I can only use it when the branch has not diverged.

How does PQM handle this?

--- On Sun, 5/10/09, John Arbash Meinel <john at> wrote:

From: John Arbash Meinel <john at>
Subject: Re: merging selective changes from merge directive patch file.
To: "Martin Pool" <mbp at>
Cc: "Niben M Singh" <niben_s at>, bazaar at
Date: Sunday, May 10, 2009, 10:53 PM

Hash: SHA1

Martin Pool wrote:
> 2009/4/17 Niben M Singh <niben_s at>:
>> Hello All -
>> I am very new to Bazaar but am very pleased with it. It's an excellent tool!
>> I have a question about merging from merge directive. If your merge
>> directive contains more than one set of changes then is it possible to
>> choose only the selected change sets from it? I can see the merge history
>> but am just curious whether I can just pick selected changes from there.
> Yes, you can treat the merge directive just like a branch and do
>  bzr merge -r 123 ../foo.diff
> (There are some bugs where they don't act precisely like branches, but
> we'll fix them eventually.)

Except for where the difference is explicit...

When you generate a merge directive, it implicitly defines the first
revision to be merged, so when you 'bzr merge ../foo.diff' it implicitly
sets a BASE revision, such as "bzr merge -r X..-1".

This was done so that you merge what you see, though sometimes to get
around this, you have to do:

 bzr branch a b
 cd b
 bzr pull ../foo.diff
 cd ../a
 bzr merge ../b

It is rare, but I've done it several times, when the branch I was
merging into wasn't the original "target" branch. (Like someone is
targeting, and I'm testing it in a feature branch of mine.)


Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla -


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the bazaar mailing list