[bug?] 'bzr branch lp:foo' doesn't work

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Feb 12 21:55:29 GMT 2007


>>>>> "john" == John Arbash Meinel <john at arbash-meinel.com> writes:

    john> Currently if you do "bzr branch lp:foo" it fails, because it actually
    john> tries to branch from http://code.launchpad.net/foo to
    john> http://code.launchpad.net/foo

    john> It does this because the code which determines the target name does:

    john> if to_location is None:
    john>     to_location = os.path.basename(from_location.rstrip("/\\"))

    john> And that will naturally not split on lp:foo (it works for lp:///foo).

    john> One possibility is to switch from using 'from_location' to using:
    john> to_location = os.path.basename(br_from.base.rstrip('/'))

I went the same route.

    john> That will cause it to use a real URL as the source
    john> location. But it has the downside that doing "bzr
    john> branch lp:bzr" will create a directory named 'trunk'.

Saw that too.

    john> Because
    john>   lp:bzr
    john>   => http://code.launchpad.net/bzr

=> https://code.launchpad.net/bzr

    john>   => http://bazaar.launchpad.net/~bzr/bzr/trunk

and then, with my last redirection patch, the user get a :

http://launchpad.net/bzr/ is permanently redirected to https://launchpad.net/bzr/

message. 

Which is not nice, may be lp_indirect should point directly do
https://launchpad.net ?

    john> Certainly I don't think we want 'bzr branch lp:foo' to
    john> try to use a target of 'lp:foo'.

    john> I wonder if we need to switch the 'lp:' prefix to be
    john> consistent with all of our other urls, or at least
    john> require a single slash "lp:/".

Both 'lp:' and 'lp:///' looks strange anyway.

    john> We could special case it, or include ':' as part of the
    john> path we would strip.

    john> I think it adds to the slick-ness if "bzr branch
    john> lp:bzr" creates a 'bzr' directory in the local working
    john> directory.

Agreed.

        Vincent



More information about the bazaar mailing list