~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-23 17:00:36 UTC
  • mfrom: (4032.1.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090223170036-3q1v68ewdt8i0to5
(Marius Kruger) Remove all trailing whitespace and add tests to
        enforce this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
            self._local_base = ''
72
72
            super(LocalTransport, self).__init__(base)
73
73
            return
74
 
            
 
74
 
75
75
        super(LocalTransport, self).__init__(base)
76
76
        self._local_base = urlutils.local_path_from_url(base)
77
77
 
78
78
    def clone(self, offset=None):
79
79
        """Return a new LocalTransport with root at self.base + offset
80
 
        Because the local filesystem does not require a connection, 
 
80
        Because the local filesystem does not require a connection,
81
81
        we can just return a new object.
82
82
        """
83
83
        if offset is None:
171
171
 
172
172
        :param relpath: Location to put the contents, relative to base.
173
173
        :param f:       File-like object.
174
 
        :param mode: The mode for the newly created file, 
 
174
        :param mode: The mode for the newly created file,
175
175
                     None means just use the default
176
176
        """
177
177
 
397
397
    def rename(self, rel_from, rel_to):
398
398
        path_from = self._abspath(rel_from)
399
399
        try:
400
 
            # *don't* call bzrlib.osutils.rename, because we want to 
 
400
            # *don't* call bzrlib.osutils.rename, because we want to
401
401
            # detect errors on rename
402
402
            os.rename(path_from, self._abspath(rel_to))
403
403
        except (IOError, OSError),e:
536
536
 
537
537
    def clone(self, offset=None):
538
538
        """Return a new LocalTransport with root at self.base + offset
539
 
        Because the local filesystem does not require a connection, 
 
539
        Because the local filesystem does not require a connection,
540
540
        we can just return a new object.
541
541
        """
542
542
        if offset is None:
553
553
 
554
554
class LocalURLServer(Server):
555
555
    """A pretend server for local transports, using file:// urls.
556
 
    
 
556
 
557
557
    Of course no actual server is required to access the local filesystem, so
558
558
    this just exists to tell the test code how to get to it.
559
559
    """
560
560
 
561
561
    def setUp(self):
562
562
        """Setup the server to service requests.
563
 
        
 
563
 
564
564
        :param decorated_transport: ignored by this implementation.
565
565
        """
566
566