/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: Aaron Bentley
  • Date: 2007-02-13 18:58:39 UTC
  • mfrom: (2283 +trunk)
  • mto: (2230.3.47 branch6)
  • mto: This revision was merged to the branch mainline in revision 2290.
  • Revision ID: abentley@panoramicfeedback.com-20070213185839-9cc540a30gtrgq1g
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2006, 2007 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
1186
1186
    """
1187
1187
    takes_args = ['location?']
1188
1188
    takes_options = [
1189
 
                     RegistryOption('format',
1190
 
                            help='Specify a format for this branch. See "bzr '
1191
 
                            'help formats" for details',
1192
 
                            converter=bzrdir.format_registry.make_bzrdir,
1193
 
                            registry=bzrdir.format_registry,
1194
 
                            value_switches=True, title="Branch Format"),
1195
 
                     ]
 
1189
         RegistryOption('format',
 
1190
                help='Specify a format for this branch. '
 
1191
                'See "help formats".',
 
1192
                registry=bzrdir.format_registry,
 
1193
                converter=bzrdir.format_registry.make_bzrdir,
 
1194
                value_switches=True,
 
1195
                title="Branch Format",
 
1196
                ),
 
1197
         ]
1196
1198
    def run(self, location=None, format=None):
1197
1199
        if format is None:
1198
1200
            format = bzrdir.format_registry.make_bzrdir('default')
1243
1245
        cd trunk-checkout
1244
1246
        (add files here)
1245
1247
    """
1246
 
    takes_args = ["location"] 
 
1248
    takes_args = ["location"]
1247
1249
    takes_options = [RegistryOption('format',
1248
1250
                            help='Specify a format for this repository. See'
1249
1251
                                 ' "bzr help formats" for details',
1509
1511
        if location:
1510
1512
            # find the file id to log:
1511
1513
 
1512
 
            dir, fp = bzrdir.BzrDir.open_containing(location)
1513
 
            b = dir.open_branch()
 
1514
            tree, b, fp = bzrdir.BzrDir.open_containing_tree_or_branch(
 
1515
                location)
1514
1516
            if fp != '':
1515
 
                try:
1516
 
                    # might be a tree:
1517
 
                    inv = dir.open_workingtree().inventory
1518
 
                except (errors.NotBranchError, errors.NotLocalUrl):
1519
 
                    # either no tree, or is remote.
1520
 
                    inv = b.basis_tree().inventory
 
1517
                if tree is None:
 
1518
                    tree = b.basis_tree()
 
1519
                inv = tree.inventory
1521
1520
                file_id = inv.path2id(fp)
1522
1521
                if file_id is None:
1523
1522
                    raise errors.BzrCommandError(