[MERGE] Exception when pulling from a location
Aaron Bentley
aaron at aaronbentley.com
Mon Feb 9 16:23:59 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> Aaron Bentley wrote:
>> John Arbash Meinel wrote:
>> > nitpick: (aka bundle or merge directive)
> True, though I almost always call merge directives bundles because MD is
> very unwieldy to actually use in conversation.
Well, if I could have said "bundle" accurately, I wouldn't have said
"mergeable". :-)
>> Why is one backwards and the other not?
>
>
> Because the former will try to read from a directory, and is the
> uncommon case. It also causes problems with HTTP servers that don't
> support index listings, or cause redirections (like trying to GET
> http://bazaar.launchpad.net/~foo/bar/baz/ will try to redirect you to
> .../~foo/bar/baz/changes because that is what a web-browser should see.)
We still need to handle those cases properly for the merge case, so can
you be more specific?
>> In the case where the specified file is versioned, and is a merge
>> directive, should merge treat it as a versioned file, or as a merge
>> directive?
> Versioning your merge directives is certainly an edge case that we could
> support either way, or allow an explicit flag for what we want to do
> with them.
> I think doing a partial merge of a versioned merge directive is an even
> further edge case, so I would officially say it should act as though the
> MD wasn't versioned at all.
When I'm trying to decide correct behavior in the general case, I often
examine edge cases. I agree that a versioned mergeable should behave
like a mergeable, not a versioned file, so I made merge try using it as
a mergeable first. And once I had determined it for merge, I made pull
consistent.
> In fact, the case I would originally try to handle is:
>
> bzr send -o foo.patch
> cd ../other
> bzr merge ../orig/foo.patch
>
> In this case "foo.patch" isn't versioned, but happens to be inside a
> versioned directory.
>
> Still, for 'bzr pull' I think it makes the most sense to try as a
> Branch.open() first, because it is unambiguous. I can respect that we
> have a harder time with "bzr merge", though it would be nice to not get
> redirect errors.
>
> Perhaps we could change the "read_mergeable_from_url" code to never
> follow redirects?
Possibly. I don't yet understand why we would need to, though.
> Or is that something people are going to want? (IMO
> merge-directives are meant to be ephemeral, and not something that you
> are going to go through the effort of setting up a redirect for.)
No, but there are sites that have generic redirects, like
www.example.com -> example.com. It's also conceivable that someone
would use tinyurl with merge directives.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmQWJwACgkQ0F+nu1YWqI3ENwCcDQNloi5FO1i9zK4sbCzbAcry
r3YAnizPZ/xtAdP6eCT/NWH+ih4RUN1P
=wz9d
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list