If you autodetect bazaar.launchpad.net/+branch/ URLs, you should bear in mind that they can have five forms:
+branch/bzr <--- a project's development focus branch
+branch/bzr/2.3 <--- a project's non-focus series branch
+branch/ubuntu/base-files <--- a source package within the current development series of a distro
+branch/debian/sid/base-files <--- a source package within a named series of a distro
+branch/ubuntu/lucid-updates/base-files <--- a source package within a named non-release pocket of a distro
In each of these cases, a smart enough "where to push back" guesser would guess:
~user/bzr/foobar # Replace +branch with ~user
~user/bzr/foobar # Replace +branch with ~user, chop series id
~user/ubuntu/natty/base-files/foobar # Replace +branch with ~user, insert name of current dev distro series, or placeholder
~user/debian/sid/base-files/foobar # Replace +branch with ~user
~user/ubuntu/lucid/base-files/foobar # Replace +branch with ~user, chop "-pocket" suffix from series id
If you autodetect bazaar. launchpad. net/+branch/ URLs, you should bear in mind that they can have five forms:
+branch/bzr <--- a project's development focus branch ubuntu/ base-files <--- a source package within the current development series of a distro debian/ sid/base- files <--- a source package within a named series of a distro ubuntu/ lucid-updates/ base-files <--- a source package within a named non-release pocket of a distro
+branch/bzr/2.3 <--- a project's non-focus series branch
+branch/
+branch/
+branch/
In each of these cases, a smart enough "where to push back" guesser would guess:
~user/bzr/foobar # Replace +branch with ~user natty/base- files/foobar # Replace +branch with ~user, insert name of current dev distro series, or placeholder sid/base- files/foobar # Replace +branch with ~user lucid/base- files/foobar # Replace +branch with ~user, chop "-pocket" suffix from series id
~user/bzr/foobar # Replace +branch with ~user, chop series id
~user/ubuntu/
~user/debian/
~user/ubuntu/