[BUG] RemoteBranch has an ugly __str__ in bzr 0.16

Bug #113197 reported by John A Meinel
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Unassigned

Bug Description

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGP6RvJdeBCYSNAAMRAn6qAKCNpRBfiHYgsZ8+53ZwIFwjOEtVlgCfW5U2
TzkzspKF0UanPX0d5K/JYMc=
=izrb
-----END PGP SIGNATURE-----

Related branches

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 113197] [BUG] RemoteBranch has an ugly __str__ in bzr 0.16

This is fixed in my counted-lock branch which is now approved. It
shows the vfs-based branch class and the url.

It may be a regression in 0.16 but I think it's not substantial enough
to do a new release.

--
Martin

Revision history for this message
John A Meinel (jameinel) wrote :

Do you have the branch registered so you can associate it with this bug?

Changed in bzr:
status: Confirmed → Fix Committed
Revision history for this message
Martin Pool (mbp) wrote :

Yes, thanks for the reminder.

Martin Pool (mbp)
Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.