← Back to team overview

launchpad-dev team mailing list archive

API issue moving branches

 

Hi Leonard,

There is a method exposed on IBranch called setTarget.  Currently this is 
marked with @export_write_operation().

However setting the target changes the URL for the object, and after the move 
has happened, we get the following error:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "./lp-prompt", line 47, in move_branch_to_project
    branch.setTarget(project=target)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 
490, in __call__
    self.resource.lp_refresh()
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 
618, in lp_refresh
    super(Entry, self).lp_refresh(new_url, etag)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 
293, in lp_refresh
    raise e
HTTPError: HTTP Error 404: Not Found

Not surprising, but how can we tell the restfulclient that the url for the 
entry has changed?

Tim



Follow ups