Last character of path stripped in result message

Bug #545185 reported by Martin von Gagern
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Pool
Bazaar Subversion Plugin
Invalid
Undecided
Unassigned

Bug Description

bzr-svn sometimes causes bzr to drop the last character of a branch URL.

$ bzr up
Tree is up to date at revision 350 of branch http://svn.unix-ag.uni-kl.de/vpnc/trun
$ bzr info | grep "checkout of"
        checkout of branch: http://svn.unix-ag.uni-kl.de/vpnc/trunk
$ bzr plugins | grep ^svn
svn 1.0.2
$ bzr --version | head -n1
Bazaar (bzr) 2.1.0

The reason seems to be that
1. bzrlib.plugins.svn.branch.SvnBranch.__init__ does a lot of strip("/") and rstrip("/") and
2. bzrlib.builtins.cmd_update.update drops the last char unconditionally:
        # get rid of the final '/' and be ready for display
        branch_location = urlutils.unescape_for_display(branch_location[:-1],
                                                        self.outf.encoding)

I don't know which one is to blame. I personally would prefer an rstrip('/') in cmd_update, but perhaps there is a good reason to do things differently, and perhaps there are other places where bzrlib expects a path with trailing slash as well, so adjusting bzr-svn might be a more complete solution, albeit probably requiring more work as well.

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

that seems pretty obviously silly and easy to fix on the bzr side

Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Martin Pool (mbp)
status: Confirmed → In Progress
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: New → Invalid
Changed in bzr:
status: In Progress → Fix Released
Revision history for this message
Lars Hoss (lars-hoss) wrote :

Had the same problem today as well. Running on bzr-svn 1.0.3-dev.

Revision history for this message
Martin Pool (mbp) wrote :

@lars but are you using bzr.dev tip?

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.