/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

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
    # TODO: --no-recurse, --recurse options
184
184
    
185
185
    takes_args = ['file*']
186
 
    takes_options = ['show-ids', 'revision', 'short']
 
186
    takes_options = ['show-ids', 'revision', 'short',
 
187
                     Option('versioned', help='Only show versioned files')]
187
188
    aliases = ['st', 'stat']
188
189
 
189
190
    encoding_type = 'replace'
190
191
    
191
192
    @display_command
192
 
    def run(self, show_ids=False, file_list=None, revision=None, short=False):
 
193
    def run(self, show_ids=False, file_list=None, revision=None, short=False,
 
194
            versioned=False):
193
195
        from bzrlib.status import show_tree_status
194
196
 
195
197
        tree, file_list = tree_files(file_list)
196
198
            
197
199
        show_tree_status(tree, show_ids=show_ids,
198
200
                         specific_files=file_list, revision=revision,
199
 
                         to_file=self.outf,
200
 
                         short=short)
 
201
                         to_file=self.outf, short=short, versioned=versioned)
201
202
 
202
203
 
203
204
class cmd_cat_revision(Command):
1286
1287
    """Create a shared repository to hold branches.
1287
1288
 
1288
1289
    New branches created under the repository directory will store their revisions
1289
 
    in the repository, not in the branch directory, if the branch format supports
1290
 
    shared storage.
 
1290
    in the repository, not in the branch directory.
1291
1291
 
1292
1292
    example:
1293
 
        bzr init-repo repo
 
1293
        bzr init-repo --no-trees repo
1294
1294
        bzr init repo/trunk
1295
1295
        bzr checkout --lightweight repo/trunk trunk-checkout
1296
1296
        cd trunk-checkout
1297
1297
        (add files here)
1298
1298
    """
 
1299
 
1299
1300
    takes_args = ["location"]
1300
1301
    takes_options = [RegistryOption('format',
1301
1302
                            help='Specify a format for this repository. See'
1303
1304
                            registry=bzrdir.format_registry,
1304
1305
                            converter=bzrdir.format_registry.make_bzrdir,
1305
1306
                            value_switches=True, title='Repository format'),
1306
 
                     Option('trees',
1307
 
                             help='Allows branches in repository to have'
1308
 
                             ' a working tree')]
 
1307
                     Option('no-trees',
 
1308
                             help='Branches in the repository will default to'
 
1309
                                  ' not having a working tree'),
 
1310
                    ]
1309
1311
    aliases = ["init-repo"]
1310
 
    def run(self, location, format=None, trees=False):
 
1312
 
 
1313
    def run(self, location, format=None, no_trees=False):
1311
1314
        if format is None:
1312
1315
            format = bzrdir.format_registry.make_bzrdir('default')
1313
1316
 
1322
1325
 
1323
1326
        newdir = format.initialize_on_transport(to_transport)
1324
1327
        repo = newdir.create_repository(shared=True)
1325
 
        repo.set_make_working_trees(trees)
 
1328
        repo.set_make_working_trees(not no_trees)
1326
1329
 
1327
1330
 
1328
1331
class cmd_diff(Command):
2296
2299
    takes_args = ['testspecs*']
2297
2300
    takes_options = ['verbose',
2298
2301
                     Option('one', help='stop when one test fails'),
2299
 
                     Option('keep-output', 
 
2302
                     Option('keep-output',
2300
2303
                            help='keep output directories when tests fail'),
2301
 
                     Option('transport', 
 
2304
                     Option('transport',
2302
2305
                            help='Use a different transport by default '
2303
2306
                                 'throughout the test suite.',
2304
2307
                            type=get_transport_type),
2305
 
                     Option('benchmark', help='run the bzr bencharks.'),
 
2308
                     Option('benchmark', help='run the bzr benchmarks.'),
2306
2309
                     Option('lsprof-timed',
2307
2310
                            help='generate lsprof output for benchmarked'
2308
2311
                                 ' sections of code.'),
2313
2316
                            help='clean temporary tests directories'
2314
2317
                                 ' without running tests'),
2315
2318
                     Option('first',
2316
 
                            help='run all tests, but run specified tests first',
 
2319
                            help='run all tests, but run specified tests first'
2317
2320
                            ),
2318
2321
                     Option('numbered-dirs',
2319
2322
                            help='use numbered dirs for TestCaseInTempDir'),
2724
2727
    """
2725
2728
    takes_options = ['revision', 'no-backup']
2726
2729
    takes_args = ['file*']
2727
 
    aliases = ['merge-revert']
2728
2730
 
2729
2731
    def run(self, revision=None, no_backup=False, file_list=None):
2730
2732
        if file_list is not None:
3256
3258
class cmd_join(Command):
3257
3259
    """Combine a subtree into its containing tree.
3258
3260
    
3259
 
    This is marked as a merge of the subtree into the containing tree, and all
3260
 
    history is preserved.
 
3261
    This command is for experimental use only.  It requires the target tree
 
3262
    to be in dirstate-with-subtree format, which cannot be converted into
 
3263
    earlier formats.
 
3264
 
 
3265
    The TREE argument should be an independent tree, inside another tree, but
 
3266
    not part of it.  (Such trees can be produced by "bzr split", but also by
 
3267
    running "bzr branch" with the target inside a tree.)
 
3268
 
 
3269
    The result is a combined tree, with the subtree no longer an independant
 
3270
    part.  This is marked as a merge of the subtree into the containing tree,
 
3271
    and all history is preserved.
 
3272
 
 
3273
    If --reference is specified, the subtree retains its independence.  It can
 
3274
    be branched by itself, and can be part of multiple projects at the same
 
3275
    time.  But operations performed in the containing tree, such as commit
 
3276
    and merge, will recurse into the subtree.
3261
3277
    """
3262
3278
 
3263
3279
    takes_args = ['tree']
3264
3280
    takes_options = [Option('reference', 'join by reference')]
 
3281
    hidden = True
3265
3282
 
3266
3283
    def run(self, tree, reference=False):
3267
3284
        sub_tree = WorkingTree.open(tree)
3291
3308
 
3292
3309
class cmd_split(Command):
3293
3310
    """Split a tree into two trees.
 
3311
 
 
3312
    This command is for experimental use only.  It requires the target tree
 
3313
    to be in dirstate-with-subtree format, which cannot be converted into
 
3314
    earlier formats.
 
3315
 
 
3316
    The TREE argument should be a subdirectory of a working tree.  That
 
3317
    subdirectory will be converted into an independent tree, with its own
 
3318
    branch.  Commits in the top-level tree will not apply to the new subtree.
 
3319
    If you want that behavior, do "bzr join --reference TREE".
 
3320
 
 
3321
    To undo this operation, do "bzr join TREE".
3294
3322
    """
3295
3323
 
3296
3324
    takes_args = ['tree']
3297
3325
 
 
3326
    hidden = True
 
3327
 
3298
3328
    def run(self, tree):
3299
3329
        containing_tree, subdir = WorkingTree.open_containing(tree)
3300
3330
        sub_id = containing_tree.path2id(subdir)
3388
3418
            server = branch.get_config().get_user_option('smtp_server')
3389
3419
            if not server:
3390
3420
                server = 'localhost'
3391
 
            s.connect()
 
3421
            s.connect(server)
3392
3422
            s.sendmail(message['From'], message['To'], message.as_string())
3393
3423
 
3394
3424