[RFC] An explicit "this branch has moved" format

Matt Nordhoff mnordhoff at mattnordhoff.com
Wed May 14 18:52:11 BST 2008


John Arbash Meinel wrote:
> Right now, Bazaar lets you use an HTTP redirect or a lightweight
> checkout to
> redirect people to a different location. I've used the lightweight checkout
> trick a few times when I move something on my local system to being
> officially
> hosted on launchpad.
> 
> Generally, I do it with bzr checkout --lightweight, rm *, rm -rf
> .bzr/checkout,
> which is a bit clumsy at the least. Also, I often end up editing the
> .bzr/branch/location file, just in case. (if I do bzr co lp:/// it writes
> bzr+ssh://jameinel@ to the location file, and I want it to have just
> lp:///).
> 
> Even more, though, the user never knows that the official location has
> moved.
> 'bzr info' will show them the new location, but the
> branch/checkout/update/pull
> commands would not.
> 
> If you use an http redirect, the user does get a message about
> "http://path is
> redirected to http://other/path", but it is a bit harder to configure an
> http
> redirect (and certainly outside the scope of bzr).
> 
> So I was thinking about adding an explicit branch format, which when opened
> would tell the user that "you can find the real branch over here, I'll
> redirect
> you". Otherwise it would work like our current BranchReference format. (the
> format behind co --lightweight.)
> 
> 
> And then we would add a command to create these. Maybe something like "bzr
> create-redirect-branch". (bzr init --format=redirect-branch? Doesn't
> quite work
> because you can't tell it the URL to redirect to.)
> 
> Thoughts?
> 
> John
> =:->

Don't forget that it needs to be able to specify it for either
public_branch/push_location/etc. or http/bzr+ssh/etc.

E.g.:

$ bzr set-control --redirect public_branch http://bzr.foo.com/branch/
$ bzr set-control --redirect push_location
bzr+ssh://bzr.foo.com/srv/bzr/branch/ # and what about the username?

If you can only set the redirect to one location, you'll have to break
either users who pull or users who push.
-- 



More information about the bazaar mailing list