~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-29 22:03:03 UTC
  • mfrom: (5416.2.6 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100929220303-cr95h8iwtggco721
(mbp) Add 'break-lock --force'

Show diffs side-by-side

added added

removed removed

Lines of Context:
4841
4841
    takes_options = [
4842
4842
        Option('config',
4843
4843
               help='LOCATION is the directory where the config lock is.'),
 
4844
        Option('force',
 
4845
            help='Do not ask for confirmation before breaking the lock.'),
4844
4846
        ]
4845
4847
 
4846
 
    def run(self, location=None, config=False):
 
4848
    def run(self, location=None, config=False, force=False):
4847
4849
        if location is None:
4848
4850
            location = u'.'
 
4851
        if force:
 
4852
            ui.ui_factory = ui.ConfirmationUserInterfacePolicy(ui.ui_factory,
 
4853
                None,
 
4854
                {'bzrlib.lockdir.break': True})
4849
4855
        if config:
4850
4856
            conf = _mod_config.LockableConfig(file_name=location)
4851
4857
            conf.break_lock()