/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 bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-03-06 07:44:17 UTC
  • mfrom: (1553.5.64 bzr.mbp.locks)
  • Revision ID: pqm@pqm.ubuntu.com-20060306074417-344f1d83d99b9730
Integrate LockDirs into new format, etc

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005 by Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2006 by Canonical Ltd
2
2
 
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
2213
2213
    
2214
2214
    In the future, uncommit will create a changeset, which can then
2215
2215
    be re-applied.
 
2216
    """
2216
2217
 
2217
 
    TODO: jam 20060108 Add an option to allow uncommit to remove unreferenced
2218
 
              information in 'branch-as-repostory' branches.
2219
 
    TODO: jam 20060108 Add the ability for uncommit to remove unreferenced
2220
 
              information in shared branches as well.
2221
 
    """
 
2218
    # TODO: jam 20060108 Add an option to allow uncommit to remove
 
2219
    # unreferenced information in 'branch-as-repostory' branches.
 
2220
    # TODO: jam 20060108 Add the ability for uncommit to remove unreferenced
 
2221
    # information in shared branches as well.
2222
2222
    takes_options = ['verbose', 'revision',
2223
2223
                    Option('dry-run', help='Don\'t actually make changes'),
2224
2224
                    Option('force', help='Say yes to all questions.')]
2271
2271
                revno=revno)
2272
2272
 
2273
2273
 
 
2274
class cmd_break_lock(Command):
 
2275
    """Break a dead lock on a repository, branch or working directory.
 
2276
 
 
2277
    CAUTION: Locks should only be broken when you are sure that the process
 
2278
    holding the lock has been stopped.
 
2279
    
 
2280
    example:
 
2281
        bzr break-lock .
 
2282
    """
 
2283
    takes_args = ['location']
 
2284
    takes_options = [Option('show',
 
2285
                            help="just show information on the lock, " \
 
2286
                                 "don't break it"),
 
2287
                    ]
 
2288
    def run(self, location, show=False):
 
2289
        d = bzrdir.BzrDir.open(location)
 
2290
        repo = d.open_repository()
 
2291
        if not repo.is_locked():
 
2292
            raise errors.ObjectNotLocked(repo)
 
2293
 
 
2294
 
 
2295
# command-line interpretation helper for merge-related commands
2274
2296
def merge(other_revision, base_revision,
2275
2297
          check_clean=True, ignore_zero=False,
2276
2298
          this_dir=None, backup_files=False, merge_type=Merge3Merger,
2277
 
          file_list=None, show_base=False, reprocess=False, 
 
2299
          file_list=None, show_base=False, reprocess=False,
2278
2300
          pb=DummyProgress()):
2279
2301
    """Merge changes into a tree.
2280
2302