~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
492
492
                        needed.append((new_transport,
493
493
                                       new_transport.relpath(transport.base)))
494
494
                        if new_transport.base == transport.base:
495
 
                            raise BzrCommandError("Could not creeate "
 
495
                            raise BzrCommandError("Could not create "
496
496
                                                  "path prefix.")
497
497
            dir_to = br_from.bzrdir.clone(location)
498
498
            br_to = dir_to.open_branch()
880
880
    takes_args = ["location"] 
881
881
    takes_options = [Option('format', 
882
882
                            help='Use a specific format rather than the'
883
 
                            ' current default format. Currently this '
884
 
                            ' option only accepts "metadir" and "knit"',
 
883
                            ' current default format. Currently this'
 
884
                            ' option only accepts "metadir" and "knit"'
 
885
                            ' WARNING: the knit format is currently unstable'
 
886
                            ' and only for experimental use.',
885
887
                            type=get_format_type)]
886
888
    aliases = ["init-repo"]
887
889
    def run(self, location, format=None):
1554
1556
    takes_options = [
1555
1557
                     Option('format', 
1556
1558
                            help='Upgrade to a specific format rather than the'
1557
 
                                 ' current default format. Currently this '
1558
 
                                 ' option only accepts =metadir',
 
1559
                                 ' current default format. Currently this'
 
1560
                                 ' option only accepts -metadir and -knit'
 
1561
                                 ' WARNING: the knit format is currently'
 
1562
                                 ' unstable and only for experimental use.',
1559
1563
                            type=get_format_type),
1560
1564
                    ]
1561
1565
 
1970
1974
    For a list of all available commands, say 'bzr help commands'."""
1971
1975
    takes_options = [Option('long', 'show help on all commands')]
1972
1976
    takes_args = ['topic?']
1973
 
    aliases = ['?']
 
1977
    aliases = ['?', '--help', '-?', '-h']
1974
1978
    
1975
1979
    @display_command
1976
1980
    def run(self, topic=None, long=False):
2039
2043
                raise BzrCommandError("No missing location known or specified.")
2040
2044
            print "Using last location: " + local_branch.get_parent()
2041
2045
        remote_branch = bzrlib.branch.Branch.open(other_branch)
2042
 
        remote_branch.lock_read()
 
2046
        local_branch.lock_write()
 
2047
        if remote_branch.base == local_branch.base:
 
2048
            remote_branch = local_branch
2043
2049
        try:
2044
 
            local_branch.lock_write()
 
2050
            remote_branch.lock_read()
2045
2051
            try:
2046
2052
                local_extra, remote_extra = find_unmerged(local_branch, remote_branch)
2047
2053
                if (log_format == None):
2271
2277
        if location is None:
2272
2278
            location = u'.'
2273
2279
        control, relpath = bzrdir.BzrDir.open_containing(location)
2274
 
        b = control.open_branch()
2275
2280
        try:
2276
2281
            tree = control.open_workingtree()
 
2282
            b = tree.branch
2277
2283
        except (errors.NoWorkingTree, errors.NotLocalUrl):
2278
2284
            tree = None
 
2285
            b = control.open_branch()
2279
2286
 
2280
2287
        if revision is None:
2281
2288
            revno = b.revno()
2321
2328
                                 "don't break it"),
2322
2329
                    ]
2323
2330
    def run(self, location, show=False):
2324
 
        d = bzrdir.BzrDir.open(location)
2325
 
        repo = d.open_repository()
2326
 
        if not repo.is_locked():
2327
 
            raise errors.ObjectNotLocked(repo)
 
2331
        raise NotImplementedError("sorry, break-lock is not complete yet; "
 
2332
                "you can remove the 'held' directory manually to break the lock")
2328
2333
 
2329
2334
 
2330
2335
# command-line interpretation helper for merge-related commands
2402
2407
# details were needed.
2403
2408
from bzrlib.conflicts import cmd_resolve, cmd_conflicts, restore
2404
2409
from bzrlib.sign_my_commits import cmd_sign_my_commits
2405
 
from bzrlib.weave_commands import cmd_weave_list, cmd_weave_join
 
2410
from bzrlib.weave_commands import cmd_weave_list, cmd_weave_join, \
 
2411
        cmd_weave_plan_merge, cmd_weave_merge_text