~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-13 19:44:43 UTC
  • mfrom: (2353.2.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070313194443-cb3e725957c95642
(Wouter van Heyst) switch 'bzr init-repo' to default to '--no-trees'

Show diffs side-by-side

added added

removed removed

Lines of Context:
1291
1291
    shared storage.
1292
1292
 
1293
1293
    example:
1294
 
        bzr init-repo repo
 
1294
        bzr init-repo --no-trees repo
1295
1295
        bzr init repo/trunk
1296
1296
        bzr checkout --lightweight repo/trunk trunk-checkout
1297
1297
        cd trunk-checkout
1298
1298
        (add files here)
1299
1299
    """
 
1300
 
1300
1301
    takes_args = ["location"]
1301
1302
    takes_options = [RegistryOption('format',
1302
1303
                            help='Specify a format for this repository. See'
1304
1305
                            registry=bzrdir.format_registry,
1305
1306
                            converter=bzrdir.format_registry.make_bzrdir,
1306
1307
                            value_switches=True, title='Repository format'),
1307
 
                     Option('trees',
1308
 
                             help='Allows branches in repository to have'
1309
 
                             ' a working tree')]
 
1308
                     Option('no-trees',
 
1309
                             help='Branches in the repository will default to'
 
1310
                                  'not having a working tree'),
 
1311
                    ]
1310
1312
    aliases = ["init-repo"]
1311
 
    def run(self, location, format=None, trees=False):
 
1313
 
 
1314
    def run(self, location, format=None, no_trees=False):
1312
1315
        if format is None:
1313
1316
            format = bzrdir.format_registry.make_bzrdir('default')
1314
1317
 
1323
1326
 
1324
1327
        newdir = format.initialize_on_transport(to_transport)
1325
1328
        repo = newdir.create_repository(shared=True)
1326
 
        repo.set_make_working_trees(trees)
 
1329
        repo.set_make_working_trees(not no_trees)
1327
1330
 
1328
1331
 
1329
1332
class cmd_diff(Command):