/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/fakenfs.py

  • Committer: Jelmer Vernooij
  • Date: 2020-04-05 19:11:34 UTC
  • mto: (7490.7.16 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200405191134-0aebh8ikiwygxma5
Populate the .gitignore file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
To get a fake nfs transport use get_transport('fakenfs+' + real_url)
23
23
"""
24
24
 
 
25
from __future__ import absolute_import
 
26
 
25
27
from stat import S_ISDIR
26
28
 
27
 
from bzrlib import (
 
29
from .. import (
28
30
    errors,
29
31
    urlutils,
30
32
    )
31
 
from bzrlib.transport import decorator
 
33
from . import decorator
32
34
 
33
35
 
34
36
class FakeNFSTransportDecorator(decorator.TransportDecorator):
47
49
        """
48
50
        try:
49
51
            self._decorated.rename(rel_from, rel_to)
50
 
        except (errors.DirectoryNotEmpty, errors.FileExists), e:
 
52
        except (errors.DirectoryNotEmpty, errors.FileExists) as e:
51
53
            # if this is a directory rename, raise
52
54
            # resourcebusy rather than DirectoryNotEmpty
53
55
            stat = self._decorated.stat(rel_to)
64
66
 
65
67
def get_test_permutations():
66
68
    """Return the permutations to be used in testing."""
67
 
    from bzrlib.tests import test_server
68
 
    return [(FakeNFSTransportDecorator, test_server.FakeNFSServer),]
 
69
    from breezy.tests import test_server
 
70
    return [(FakeNFSTransportDecorator, test_server.FakeNFSServer), ]