Comment 7 for bug 2003950

Revision history for this message
Colin Watson (cjwatson) wrote :

I don't think this can really be done as a fix to `lp.branches.getByPath`. That returns a branch entry, and there's no space in that for a suffix. It also seems difficult to design a webservice API method that returns a tuple of a branch entry and a suffix - I don't think lazr.restfulclient could deal with that sort of thing very well.

On the other hand, none of this is very difficult to put together a new API for if we can agree on what shape it should take.

What was it in the old API you were trying to get away from? Was it just the XML-RPC nature of it (reasonable) or was there something about the response? If it was just the XML-RPC bit, we could add something that looks pretty much like the old API but runs over the webservice instead.

Alternatively, I wonder about something like this (hypothetically):

  >>> lp.branches.getBranchURLByPath(path='ubuntu-test-cases/server/testsuites/default', scheme='https')
  'https://bazaar.launchpad.net/~ubuntu-server-qa/ubuntu-test-cases/server-tests-raring/testsuites/default'

Then you could just ask for the scheme you want. Would that be convenient? Or is there some other shape of API that would work better for Breezy?