Comment 1 for bug 299254

Revision history for this message
Andrew Bennetts (spiv) wrote :

Here's a quick patch to RemoteTransport that fixes the issue:

$ bzr cdiff bzrlib/transport/remote.py
=== modified file 'bzrlib/transport/remote.py'
--- bzrlib/transport/remote.py 2008-11-03 19:05:06 +0000
+++ bzrlib/transport/remote.py 2008-11-17 22:54:56 +0000
@@ -172,7 +172,12 @@
         try:
             return self._client.call(method, *args)
         except errors.ErrorFromSmartServer, err:
- self._translate_error(err)
+ # The first argument, if present, is always a path.
+ if args:
+ context = {'orig_path': args[0]}
+ else:
+ context = {}
+ self._translate_error(err, **context)

     def _call_with_body_bytes(self, method, args, body):
         """Call a method on the remote server with body bytes."""

It needs tests, obviously.