[BUG] Merging an MD into a different branch causes a cherrypick

Aaron Bentley aaron.bentley at utoronto.ca
Tue Oct 30 20:44:59 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel wrote:
> I feel like it should be possible to merge a MD into a branch that it is not
> directed towards, as long as you have the required revisions (this may be
> contentious, so I'm stating it up front.)

Agreed.  But a cherrypick is a kind of merge.

> However if you create a MD against one branch, it actually creates a
> cherry-pick against that branch (by default). So when I merge it into a
> different branch, it fails.


>  bzr merge ../fixed_feature_b.patch
> 
> Will fail.

Can you please describe the failure?


> Because the "send" command sets the "base_revision_id" to the tip of
> trunk. So it is the same as saying:
> 
>  cd feature_b
>  bzr merge ../fix_b -r -2..-1
> 
> Rather than
> 
>  cd feature_b
>  bzr merge ../fix_b

But the merge directive is only for -2..-1.  If it applied other
changes, that would violate the expectations set up by the preview patch.

> I *think* the solution would be to not set "base_revision_id" as the merge base
> unless the user actually requested a cherry pick from the beginning.

I don't think we can reasonably show a preview patch if we can't predict
what will happen when the merge directive is merged.

> At a minimum, I think "bzr merge ../foo.patch" should give a warning or some
> sort of indication that it is doing a cherry pick, rather than a regular merge.

That would be fine.

>   affects bzr
>   status triaged
>   importance medium

I feel that this is too soon to be marking this as a bug.  It should be
obvious that this is the intended behavior, whether or not you feel it's
the correct behavior.

Also, if I hit reply all, that will include new at bugs.launchpad.net.
Will that be bad?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJ5fL0F+nu1YWqI0RAteUAJ4nNvdwacXgF4svWuqKzqkxQEokCACfbqI0
fsRPWlBTFN3tTB7A6ddyq08=
=kcoC
-----END PGP SIGNATURE-----



More information about the bazaar mailing list