/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Marius Kruger
  • Date: 2010-07-10 21:28:56 UTC
  • mto: (5384.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5385.
  • Revision ID: marius.kruger@enerweb.co.za-20100710212856-uq4ji3go0u5se7hx
* Update documentation
* add NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
        try:
136
136
            out = [ ]
137
137
            # TODO: win32 incorrectly lists paths with non-ascii if path is not
138
 
            # unicode. However on Linux the server should only deal with
 
138
            # unicode. However on unix the server should only deal with
139
139
            # bytestreams and posix.listdir does the right thing
140
140
            if sys.platform == 'win32':
141
141
                flist = [f.encode('utf8') for f in os.listdir(path)]
446
446
                'the local current working directory.' % (backing_server,))
447
447
        self._original_vendor = ssh._ssh_vendor_manager._cached_ssh_vendor
448
448
        ssh._ssh_vendor_manager._cached_ssh_vendor = self._vendor
449
 
        # FIXME: the following block should certainly just be self._homedir =
450
 
        # osutils.getcwd() but that fails badly on Unix -- vila 20100224
451
449
        if sys.platform == 'win32':
452
450
            # Win32 needs to use the UNICODE api
453
451
            self._homedir = os.getcwdu()
 
452
            # Normalize the path or it will be wrongly escaped
 
453
            self._homedir = osutils.normpath(self._homedir)
454
454
        else:
455
 
            # But Linux SFTP servers should just deal in bytestreams
 
455
            # But unix SFTP servers should just deal in bytestreams
456
456
            self._homedir = os.getcwd()
457
457
        if self._server_homedir is None:
458
458
            self._server_homedir = self._homedir