~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2006-05-04 13:55:32 UTC
  • mto: (1697.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1701.
  • Revision ID: robertc@robertcollins.net-20060504135532-f0152b27530fd30c
Hook in the full break-lock ui.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2425
2425
 
2426
2426
    CAUTION: Locks should only be broken when you are sure that the process
2427
2427
    holding the lock has been stopped.
 
2428
 
 
2429
    You can get information on what locks are open via the 'bzr info' command.
2428
2430
    
2429
2431
    example:
2430
 
        bzr break-lock .
 
2432
        bzr break-lock
2431
2433
    """
2432
 
    takes_args = ['location']
2433
 
    takes_options = [Option('show',
2434
 
                            help="just show information on the lock, " \
2435
 
                                 "don't break it"),
2436
 
                    ]
2437
 
    def run(self, location, show=False):
2438
 
        raise NotImplementedError("sorry, break-lock is not complete yet; "
2439
 
                "you can remove the 'held' directory manually to break the lock")
 
2434
    takes_args = ['location?']
 
2435
 
 
2436
    def run(self, location=None, show=False):
 
2437
        if location is None:
 
2438
            location = u'.'
 
2439
        control, relpath = bzrdir.BzrDir.open_containing(location)
 
2440
        control.break_lock()
 
2441
        
2440
2442
 
2441
2443
 
2442
2444
# command-line interpretation helper for merge-related commands