Comment 10 for bug 245964

Revision history for this message
Vincent Ladeuil (vila) wrote :

Long story short: decorators are incompatible with redirects.

Long story:
- only http is concerned by redirects (obviously)
- an http server can redirect urls to anything (not only http), but AFAIK, it will never add back bzr decorators (so, for example, using nosmart+ disable the hpss probing but when redirection occurs, the probing will be done again since we now use a simple http:// scheme)
- bzr never follows redirections *except* in bzrdir.py
- bzrdir redirection handling was meant to be used only at *first* access (which was for the branch format file (which explains the otherwise weird e.target.endswith(relpath)) all other uses are undefined

This should be fixed.

Until then, redirection works if you're lucky (and we have been lucky for a long time)

The FIXME in that part of the code is about the fact that decorators are lost here, which, at the time, meant that an http+urllib, when redirected became an http+pycurl because pycurl was (and still is) the default http transport returned by get_transport(). This now applies equally well for nosmart+ and readonly+ or any decorator: they are lost and their associated semantic with them.