/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 breezy/transport/local.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-11 04:08:32 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181111040832-nsljjynzzwmznf3h
Run autopep8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
        # jam 20060426 Using normpath on the real path, because that ensures
105
105
        #       proper handling of stuff like
106
106
        path = osutils.normpath(osutils.pathjoin(
107
 
                    self._local_base, urlutils.unescape(relpath)))
 
107
            self._local_base, urlutils.unescape(relpath)))
108
108
        # on windows, our _local_base may or may not have a drive specified
109
109
        # (ie, it may be "/" or "c:/foo").
110
110
        # If 'relpath' is '/' we *always* get back an abspath without
112
112
        # we want our abspaths to have a drive letter too - so handle that
113
113
        # here.
114
114
        if (sys.platform == "win32" and self._local_base[1:2] == ":"
115
 
            and path == '/'):
 
115
                and path == '/'):
116
116
            path = self._local_base[:3]
117
117
 
118
118
        return urlutils.local_path_to_url(path)
233
233
            # We couldn't create the file, maybe we need to create
234
234
            # the parent directory, and try again
235
235
            if (not create_parent_dir
236
 
                or e.errno not in (errno.ENOENT, errno.ENOTDIR)):
 
236
                    or e.errno not in (errno.ENOENT, errno.ENOTDIR)):
237
237
                self._translate_error(e, relpath)
238
238
            parent_dir = os.path.dirname(abspath)
239
239
            if not parent_dir:
296
296
            st = self.stat(relpath)
297
297
            if S_ISDIR(st[ST_MODE]):
298
298
                for i, basename in enumerate(self.list_dir(relpath)):
299
 
                    queue.insert(i, relpath+'/'+basename)
 
299
                    queue.insert(i, relpath + '/' + basename)
300
300
            else:
301
301
                yield relpath
302
302
 
563
563
 
564
564
    def abspath(self, relpath):
565
565
        path = osutils._win32_normpath(osutils.pathjoin(
566
 
                    self._local_base, urlutils.unescape(relpath)))
 
566
            self._local_base, urlutils.unescape(relpath)))
567
567
        return urlutils._win32_local_path_to_url(path)
568
568
 
569
569
    def clone(self, offset=None):
586
586
def get_test_permutations():
587
587
    """Return the permutations to be used in testing."""
588
588
    from ..tests import test_server
589
 
    return [(LocalTransport, test_server.LocalURLServer),]
 
589
    return [(LocalTransport, test_server.LocalURLServer), ]