Rev 4825: (vila) Backport fixes bug #526211 and bug #526353 (sftp stub test in file:///home/pqm/archives/thelove/bzr/2.1/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Mar 5 10:33:52 GMT 2010
At file:///home/pqm/archives/thelove/bzr/2.1/
------------------------------------------------------------
revno: 4825 [merge]
revision-id: pqm at pqm.ubuntu.com-20100305103351-zj43vgxsnyjf0oce
parent: pqm at pqm.ubuntu.com-20100305082106-0e13lwd00apytqvj
parent: v.ladeuil+lp at free.fr-20100305100222-si1nwsvgiamiz2mi
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.1
timestamp: Fri 2010-03-05 10:33:51 +0000
message:
(vila) Backport fixes bug #526211 and bug #526353 (sftp stub test
server)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/stub_sftp.py stub_sftp.py-20051027032739-0e7ef4f7bab0e174
=== modified file 'NEWS'
--- a/NEWS 2010-03-05 07:49:31 +0000
+++ b/NEWS 2010-03-05 08:48:31 +0000
@@ -14,6 +14,9 @@
Bug Fixes
*********
+* Fix stub sftp test server to call os.getcwdu().
+ (Vincent Ladeuil, #526211, #526353)
+
* Merge correctly when this_tree is not a WorkingTree. (Aaron Bentley)
* Register SIGWINCH handler only when creating a ``TextUIFactory``; avoids
=== modified file 'bzrlib/tests/stub_sftp.py'
--- a/bzrlib/tests/stub_sftp.py 2010-02-17 17:11:16 +0000
+++ b/bzrlib/tests/stub_sftp.py 2010-03-05 08:48:31 +0000
@@ -297,14 +297,14 @@
threading.Thread(target=self._callback, args=(s,)).start()
except socket.error, x:
sys.excepthook(*sys.exc_info())
- warning('Socket error during accept() within unit test server'
- ' thread: %r' % x)
+ trace.warning('Socket error during accept() '
+ 'within unit test server thread: %r' % x)
except Exception, x:
# probably a failed test; unit test thread will log the
# failure/error
sys.excepthook(*sys.exc_info())
- warning('Exception from within unit test server thread: %r' %
- x)
+ trace.warning(
+ 'Exception from within unit test server thread: %r' % x)
class SocketDelay(object):
@@ -438,13 +438,15 @@
if not (backing_server is None or
isinstance(backing_server, local.LocalURLServer)):
raise AssertionError(
- "backing_server should not be %r, because this can only serve the "
- "local current working directory." % (backing_server,))
+ 'backing_server should not be %r, because this can only serve '
+ 'the local current working directory.' % (backing_server,))
self._original_vendor = ssh._ssh_vendor_manager._cached_ssh_vendor
ssh._ssh_vendor_manager._cached_ssh_vendor = self._vendor
+ # FIXME: the following block should certainly just be self._homedir =
+ # osutils.getcwd() but that fails badly on Unix -- vila 20100224
if sys.platform == 'win32':
# Win32 needs to use the UNICODE api
- self._homedir = getcwd()
+ self._homedir = os.getcwdu()
else:
# But Linux SFTP servers should just deal in bytestreams
self._homedir = os.getcwd()
More information about the bazaar-commits
mailing list