1
# Copyright (C) 2004, 2005 by Canonical Ltd
1
# Copyright (C) 2004, 2005, 2006 by Canonical Ltd
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
2214
2214
In the future, uncommit will create a changeset, which can then
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.
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.')]
2274
class cmd_break_lock(Command):
2275
"""Break a dead lock on a repository, branch or working directory.
2277
CAUTION: Locks should only be broken when you are sure that the process
2278
holding the lock has been stopped.
2283
takes_args = ['location']
2284
takes_options = [Option('show',
2285
help="just show information on the lock, " \
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)
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.