when RemoteTransport.mkdir raised PermissionDenied, the path is always None
Bug #299254 reported by
Michael Hudson-Doyle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Andrew Bennetts |
Bug Description
As discussed on #bzr, RemoteTransport
<spiv> Ah, so it is. That seems to be a bug in RemoteTransport
<spiv> RemoteTransport didn't exactly handle PermissionDenied gracefully before 1.9 either...
<mwhudson> spiv: yes, that's what i'm finding
<mwhudson> mkdir calls _call2 calls _translate_error without passing on relpath
Related branches
Changed in bzr: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Here's a quick patch to RemoteTransport that fixes the issue:
$ bzr cdiff bzrlib/ transport/ remote. py transport/ remote. py' transport/ remote. py 2008-11-03 19:05:06 +0000 transport/ remote. py 2008-11-17 22:54:56 +0000 call(method, *args) ErrorFromSmartS erver, err: _error( err) _error( err, **context)
=== modified file 'bzrlib/
--- bzrlib/
+++ bzrlib/
@@ -172,7 +172,12 @@
try:
return self._client.
except errors.
- self._translate
+ # The first argument, if present, is always a path.
+ if args:
+ context = {'orig_path': args[0]}
+ else:
+ context = {}
+ self._translate
def _call_with_ body_bytes( self, method, args, body):
"""Call a method on the remote server with body bytes."""
It needs tests, obviously.