Cannot merge bundles created without referencing another branch.
Martin Pool
mbp at sourcefrog.net
Wed Oct 10 00:12:46 BST 2007
On 10/10/07, John Arbash Meinel <john at arbash-meinel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Paul Moore wrote:
> > On 09/10/2007, John Arbash Meinel <john at arbash-meinel.com> wrote:
> >> Specifically, I have 1 branch of my homework assignment. I submit it at
> >> revision 8. And then they ask for changes. So I want to send the changes
> >> from revision 8 to the new tip.
> >>
> >> bzr send -r 8..-1
> >>
> >> Seems like a really nice, simple, and straightforward way to do that.
> >
> > As a complete novice, I have to say that my immediate reaction was
> > surprise, if you're saying that you can't do that.
> >
> > I tried to understand *why* you couldn't and rapidly got confused. My
> > mental model says that this is a more robust and automated way of
> > doing the equivalent of bzr diff -r 8..-1, save it as a patch, send it
> > off. Clearly, it isn't, when I start looking at the documentation, but
> > I've no idea what to make of the concept of a "submit branch" or a
> > "public branch".
> >
> > The questions I immediately came up with when I started thinking about
> > this were:
> >
> > 1. How *do* I do something like bzr diff -r 8..-1, but rather than
> > producing a patch file, produce a binary-safe,
> > copy/move/delete-preserving "thing" (I want to say "bundle", but I
> > don't know for sure how the technical meaning of the word "bundle"
> > might differ from what I'm describing).
I agree that 'bzr send -r 8..-1' has a commonsense meaning and we should try to
make sure it behaves as you'd expect, or at least makes it easy to see how you
can get what you expect.
As I understand it the reason why this is failing is that the recipient of the
patch must have a copy of your r8 to apply the bundle.
(This is the difference from a diff, which can be applied to anything even
approximately the same. The bundle can be merged into a tree that ends up
having a fuzzy merge or even conflicts, but we need to start out by creating
the same revisions.)
If they don't have your r8, we need to go back and find a revision they do
have, and send a delta relative to that.
So we need to know something about what revisions they already have.
This is straightforward if the sender can see a copy of the branch they
want to be merged into, which is what the submit_branch is.
It might be better if we showed the submit branch, something like
making bundle to merge 23..88 into ../trunk
because as it's automatically set it's possible it can be wrong.
If you're sending it 'blind' without knowing what the recipient has then it's a
bit harder. As Aaron says you could use an empty branch as the reference
though that will basically send a whole copy of the tree, I think.
--
Martin
More information about the bazaar
mailing list