~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
    def _realpath(self, path):
84
84
        # paths returned from self.canonicalize() always start with
85
85
        # a path separator. So if 'root' is just '/', this would cause
86
 
        # a double slash at the beginning '//home/dir'. 
 
86
        # a double slash at the beginning '//home/dir'.
87
87
        if self.root == '/':
88
88
            return self.canonicalize(path)
89
89
        return self.root + self.canonicalize(path)
96
96
            #     /h:/foo/bar
97
97
            # and relative paths stay the same:
98
98
            #     foo/bar
99
 
            # win32 needs to use the Unicode APIs. so we require the 
 
99
            # win32 needs to use the Unicode APIs. so we require the
100
100
            # paths to be utf8 (Linux just uses bytestreams)
101
101
            thispath = path.decode('utf8')
102
102
            if path.startswith('/'):
124
124
            out = [ ]
125
125
            # TODO: win32 incorrectly lists paths with non-ascii if path is not
126
126
            # unicode. However on Linux the server should only deal with
127
 
            # bytestreams and posix.listdir does the right thing 
 
127
            # bytestreams and posix.listdir does the right thing
128
128
            if sys.platform == 'win32':
129
129
                flist = [f.encode('utf8') for f in os.listdir(path)]
130
130
            else: