Comment 8 for bug 250451

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: bzr suggests wrong URL for break-lock with a LP hosted branch

> Somewhere deep down some file-like object gets written to with the following bytes:
> "d16:Software version7:1.15deves6l17:Branch.lock_write25:~larstiq/+junk/bug250451/0:0:ee"

Ignoring headers and whatnot, this is just a simple HPSS call to Branch.lock_write:

>>> bdecode("l17:Branch.lock_write25:~larstiq/+junk/bug250451/0:0:e")
['Branch.lock_write', '~larstiq/+junk/bug250451/', '', '']

The -Dhpss logging would be an easier way to observe the HPSS traffic. As you notice, the useless URL is not coming from the client. The two most likely fixes are:

 a) make the client ignore whatever URL the server returns when generating the break-lock message, or
 b) make the server send usable URL (or maybe relpath) in its LockContention errors (and/or other lock-related errors).

I'd probably be inclined to go with the first option, although for perfect correctness I think perhaps we should do both. In general all paths returned by the server probably need to go through some sort of explicit translation back to client-usable relpaths, but that's out-of-scope for this particular bug report.