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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
 
84
84
Example usage:
85
85
 
86
 
>>> from bzrlib.transport.memory import MemoryTransport
 
86
>>> from breezy.transport.memory import MemoryTransport
87
87
>>> # typically will be obtained from a BzrDir, Branch, etc
88
88
>>> t = MemoryTransport()
89
89
>>> l = LockDir(t, 'sample-lock')
112
112
import os
113
113
import time
114
114
 
115
 
from bzrlib import (
 
115
from breezy import (
116
116
    config,
117
117
    debug,
118
118
    errors,
121
121
    ui,
122
122
    urlutils,
123
123
    )
124
 
from bzrlib.decorators import only_raises
125
 
from bzrlib.errors import (
 
124
from breezy.decorators import only_raises
 
125
from breezy.errors import (
126
126
        DirectoryNotEmpty,
127
127
        FileExists,
128
128
        LockBreakMismatch,
136
136
        ResourceBusy,
137
137
        TransportError,
138
138
        )
139
 
from bzrlib.trace import mutter, note
140
 
from bzrlib.osutils import format_delta, rand_chars, get_host_name
141
 
from bzrlib.i18n import gettext
 
139
from breezy.trace import mutter, note
 
140
from breezy.osutils import format_delta, rand_chars, get_host_name
 
141
from breezy.i18n import gettext
142
142
 
143
 
from bzrlib.lazy_import import lazy_import
 
143
from breezy.lazy_import import lazy_import
144
144
lazy_import(globals(), """
145
 
from bzrlib import rio
 
145
from breezy import rio
146
146
""")
147
147
 
148
148
# XXX: At the moment there is no consideration of thread safety on LockDir
407
407
        if holder_info is not None:
408
408
            if ui.ui_factory.confirm_action(
409
409
                u"Break %(lock_info)s",
410
 
                'bzrlib.lockdir.break',
 
410
                'breezy.lockdir.break',
411
411
                dict(lock_info=unicode(holder_info))):
412
412
                result = self.force_break(holder_info)
413
413
                ui.ui_factory.show_message(
626
626
                    msg += '\n' + gettext(
627
627
                             'Will continue to try until %s, unless '
628
628
                             'you press Ctrl-C.') % deadline_str
629
 
                msg += '\n' + gettext('See "bzr help break-lock" for more.')
 
629
                msg += '\n' + gettext('See "brz help break-lock" for more.')
630
630
                self._report_function(msg)
631
631
            if (max_attempts is not None) and (attempt_count >= max_attempts):
632
632
                self._trace("exceeded %d attempts")