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

(John Arbash Meinel) Fix bug #75721: 'bzr push' should only connect a single time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
        """
277
277
        raise NotImplementedError(self.clone)
278
278
 
 
279
    def ensure_base(self):
 
280
        """Ensure that the directory this transport references exists.
 
281
 
 
282
        This will create a directory if it doesn't exist.
 
283
        :return: True if the directory was created, False otherwise.
 
284
        """
 
285
        # The default implementation just uses "Easier to ask for forgiveness
 
286
        # than permission". We attempt to create the directory, and just
 
287
        # suppress a FileExists exception.
 
288
        try:
 
289
            self.mkdir('.')
 
290
        except errors.FileExists:
 
291
            return False
 
292
        else:
 
293
            return True
 
294
 
279
295
    def should_cache(self):
280
296
        """Return True if the data pulled across should be cached locally.
281
297
        """