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

John Arbash Meinel john at arbash-meinel.com
Mon Feb 12 19:44:52 GMT 2007


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

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

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

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

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

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


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

Because
  lp:bzr
  => http://code.launchpad.net/bzr
  => http://bazaar.launchpad.net/~bzr/bzr/trunk

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

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

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

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

Note, this effects more than just 'bzr branch', it also affects things
like "bzr checkout" which does:
% bzr checkout lp:bzr
bzr: ERROR: http://bazaar.launchpad.net/~bzr/bzr/trunk/.bzr/ is not a
local path.


John
=:->

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

iD8DBQFF0MO0JdeBCYSNAAMRAhg/AJ9mJSk7EVOWL/+tWi4AmE4Lq0sdfQCgwQkb
m+02XEkm971KRT0InHMhSh8=
=1kDy
-----END PGP SIGNATURE-----



More information about the bazaar mailing list