[BUG] RemoteBranch has an ugly __str__ in bzr 0.16
John Arbash Meinel
john at arbash-meinel.com
Mon May 7 23:10:43 BST 2007
I'm using bzr+ssh:// for heavy checkouts, and I came across this error:
% bzr commit -m ...
bzr: ERROR: Bound branch
BzrBranch5('file:///home/jameinel/dev/bzr/0.17-dev/dirstate_pyrex/') is
out of date with master branch <bzrlib.remote.RemoteBranch object at
0xb7b607cc>.
To commit to master branch, run update and then commit.
You can also pass --local to commit to continue working disconnected.
The current error reporting code expects to be able to display the
branch and its information. There are a few fixes to be made
1) RemoteBranch.__str__() should return something nice including
self.base. As is, we have no idea what "master branch" we are connected
to in this error.
2) Update the exception to use self.branch.base instead of the raw
Branch. This just depends whether we want to see "BzrBranch5" versus
"RemoteBranch". It could be useful sometime (especially if we end up
with a lot of formats over time). So this is a maybe.
3) Use urlutils.display_url() rather than the raw url when reporting to
the user. That would let us change 'file:///' into a real local path,
and would also help a lot if people start using non-ascii filenames
(since they have to be URL encoded when displaying a real URL).
Technically this is a regression in bzr 0.16, but I'm not sure it is
worthy of a backport.
John
=:->
affects /products/bzr
status confirmed
importance high
More information about the bazaar
mailing list