/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: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from stat import ST_MODE, S_ISDIR, S_IMODE
26
26
import sys
27
27
 
28
 
from brzlib.lazy_import import lazy_import
 
28
from breezy.lazy_import import lazy_import
29
29
lazy_import(globals(), """
30
30
import errno
31
31
import shutil
32
32
 
33
 
from brzlib import (
 
33
from breezy import (
34
34
    atomicfile,
35
35
    osutils,
36
36
    urlutils,
37
37
    symbol_versioning,
38
38
    )
39
 
from brzlib.transport import LateReadError
 
39
from breezy.transport import LateReadError
40
40
""")
41
41
 
42
 
from brzlib import transport
 
42
from breezy import transport
43
43
 
44
44
 
45
45
_append_flags = os.O_CREAT | os.O_APPEND | os.O_WRONLY | osutils.O_BINARY | osutils.O_NOINHERIT
401
401
        path_from = self._abspath(rel_from)
402
402
        path_to = self._abspath(rel_to)
403
403
        try:
404
 
            # *don't* call brzlib.osutils.rename, because we want to
 
404
            # *don't* call breezy.osutils.rename, because we want to
405
405
            # detect conflicting names on rename, and osutils.rename tries to
406
406
            # mask cross-platform differences there
407
407
            os.rename(path_from, path_to)
431
431
            self._translate_error(e, path)
432
432
 
433
433
    def external_url(self):
434
 
        """See brzlib.transport.Transport.external_url."""
 
434
        """See breezy.transport.Transport.external_url."""
435
435
        # File URL's are externally usable.
436
436
        return self.base
437
437
 
491
491
        """Lock the given file for shared (read) access.
492
492
        :return: A lock object, which should be passed to Transport.unlock()
493
493
        """
494
 
        from brzlib.lock import ReadLock
 
494
        from breezy.lock import ReadLock
495
495
        path = relpath
496
496
        try:
497
497
            path = self._abspath(relpath)
505
505
 
506
506
        :return: A lock object, which should be passed to Transport.unlock()
507
507
        """
508
 
        from brzlib.lock import WriteLock
 
508
        from breezy.lock import WriteLock
509
509
        return WriteLock(self._abspath(relpath))
510
510
 
511
511
    def rmdir(self, relpath):
583
583
 
584
584
def get_test_permutations():
585
585
    """Return the permutations to be used in testing."""
586
 
    from brzlib.tests import test_server
 
586
    from breezy.tests import test_server
587
587
    return [(LocalTransport, test_server.LocalURLServer),]