"bzr send ../unrelated-branch" will send the whole ancestry

John Arbash Meinel john at arbash-meinel.com
Fri Nov 2 21:29:46 GMT 2007


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

Matt Nordhoff wrote:
> John Arbash Meinel wrote:
>> It would seem like "bzr send ../unrelated-branch" should just refuse
>> with a
>> "no-common ancestor" error, rather than sending a bundle with the
>> complete
>> ancestry.
>>
>> My specific case is that I set up a recursive "submit_to = bzr.dev"
>> but it got
>> confused when I went to "bzr send" a plugin. But either way, if you
>> had a typo
>> in "unrelated-branch" it would create a bundle you probably don't want
>> to send.
> 
> I've never used 'bzr send'. Maybe if I had, the answers to these
> questions would be obvious.
> 
> Anyway, just to throw it out there...
> 
> If the target branch is empty, how should it behave?

It is arguable that this could be a way to send the whole ancestry. But I'm
guessing failing is still reasonable. When a project has 10 revisions, we could
just send it. But projects will always tend towards becoming long-lived, and
thus the "send it anyway" behavior becomes the wrong one in most cases.

> 
> And also, should it really be a fatal error? What about having a --force
> argument to override it, or just giving a warning or an "are you sure?"
> prompt, like with 'bzr uncommit'?

I think in general, we avoid "are you sure" prompts. And I would consider
getting rid of the uncommit one. (In its place, if we display the revision id
that we used to be at, the user could then "bzr pull -rrevid:XXX" to get back
to where they were.) The prompt actually was included by me, because it used to
more forcibly delete the newly unreferenced data. (That was back with the
plain-text format, say 0.0.4.) Uncommit is now lossless (as long as you can
figure out the appropriate revision id).

So I would go with "--force". (uncommit also has --force, which avoids the
prompt, actually.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHK5bJJdeBCYSNAAMRAhfZAJ4pCajt7H91HM9LgbcyqdvPeJhhSACgvwvR
sO+9cKxCKsGR20HvGPixsWE=
=BfrZ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list