Rev 2241: Various nits discovered by pyflakes. in sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/

Andrew Bennetts andrew.bennetts at canonical.com
Fri Apr 20 06:13:24 BST 2007


At sftp://bazaar.launchpad.net/%7Ebzr/bzr/hpss/

------------------------------------------------------------
revno: 2241
revision-id: andrew.bennetts at canonical.com-20070420051146-m7pn8rgwfh1c8umz
parent: andrew.bennetts at canonical.com-20070420041837-txtmgcf5e26rlagl
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: hpss
timestamp: Fri 2007-04-20 15:11:46 +1000
message:
  Various nits discovered by pyflakes.
modified:
  bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
  bzrlib/smart/branch.py         branch.py-20061124031907-mzh3pla28r83r97f-1
  bzrlib/smart/server.py         server.py-20061110062051-chzu10y32vx8gvur-1
  bzrlib/tests/test_remote.py    test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
  bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py	2007-04-19 04:29:20 +0000
+++ b/bzrlib/remote.py	2007-04-20 05:11:46 +0000
@@ -18,18 +18,16 @@
 # across to run on the server.
 
 from cStringIO import StringIO
-from urlparse import urlparse
 
 from bzrlib import branch, errors, lockdir, repository
 from bzrlib.branch import BranchReferenceFormat
-from bzrlib.bzrdir import BzrDir, BzrDirFormat, RemoteBzrDirFormat
+from bzrlib.bzrdir import BzrDir, RemoteBzrDirFormat
 from bzrlib.config import BranchConfig, TreeConfig
 from bzrlib.decorators import needs_read_lock, needs_write_lock
 from bzrlib.errors import NoSuchRevision
 from bzrlib.lockable_files import LockableFiles
 from bzrlib.revision import NULL_REVISION
 from bzrlib.smart import client, vfs
-from bzrlib.urlutils import unescape
 
 # Note: RemoteBzrDirFormat is in bzrdir.py
 
@@ -83,9 +81,7 @@
         return RemoteBranch(self, self.find_repository(), real_branch)
 
     def create_workingtree(self, revision_id=None):
-        self._ensure_real()
-        real_workingtree = self._real_bzrdir.create_workingtree(revision_id=revision_id)
-        return RemoteWorkingTree(self, real_workingtree)
+        raise errors.NotLocalUrl(self.transport.base)
 
     def find_branch_format(self):
         """Find the branch 'format' for this bzrdir.

=== modified file 'bzrlib/smart/branch.py'
--- a/bzrlib/smart/branch.py	2007-04-19 04:29:20 +0000
+++ b/bzrlib/smart/branch.py	2007-04-20 05:11:46 +0000
@@ -19,7 +19,6 @@
 
 from bzrlib import errors
 from bzrlib.bzrdir import BzrDir
-from bzrlib.revision import NULL_REVISION
 from bzrlib.smart.request import SmartServerRequest, SmartServerResponse
 
 

=== modified file 'bzrlib/smart/server.py'
--- a/bzrlib/smart/server.py	2007-04-10 15:54:15 +0000
+++ b/bzrlib/smart/server.py	2007-04-20 05:11:46 +0000
@@ -18,15 +18,12 @@
 
 import errno
 import socket
-import os
 import threading
 
 from bzrlib.hooks import Hooks
-from bzrlib.smart import medium
 from bzrlib import (
     trace,
     transport,
-    urlutils,
 )
 from bzrlib.smart.medium import SmartServerSocketStreamMedium
 

=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py	2007-04-19 14:55:20 +0000
+++ b/bzrlib/tests/test_remote.py	2007-04-20 05:11:46 +0000
@@ -24,7 +24,6 @@
 from cStringIO import StringIO
 
 from bzrlib import (
-    bzrdir,
     errors,
     remote,
     tests,
@@ -40,7 +39,6 @@
 from bzrlib.revision import NULL_REVISION
 from bzrlib.smart import server
 from bzrlib.smart.client import _SmartClient
-from bzrlib.transport import remote as remote_transport
 from bzrlib.transport.memory import MemoryTransport
 
 

=== modified file 'bzrlib/tests/test_smart_transport.py'
--- a/bzrlib/tests/test_smart_transport.py	2007-04-20 03:00:57 +0000
+++ b/bzrlib/tests/test_smart_transport.py	2007-04-20 05:11:46 +0000
@@ -739,9 +739,6 @@
         self.assertTrue(server.finished)
         
     def test_socket_stream_error_handling(self):
-        # Use plain python StringIO so we can monkey-patch the close method to
-        # not discard the contents.
-        from StringIO import StringIO
         server_sock, client_sock = self.portable_socket_pair()
         server = medium.SmartServerSocketStreamMedium(
             server_sock, None)
@@ -753,8 +750,6 @@
         self.assertTrue(server.finished)
         
     def test_pipe_like_stream_keyboard_interrupt_handling(self):
-        # Use plain python StringIO so we can monkey-patch the close method to
-        # not discard the contents.
         to_server = StringIO('')
         from_server = StringIO()
         server = medium.SmartServerPipeStreamMedium(




More information about the bazaar-commits mailing list