~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

[merge] robertc

Show diffs side-by-side

added added

removed removed

Lines of Context:
1279
1279
    This command checks various invariants about the branch storage to
1280
1280
    detect data corruption or bzr bugs.
1281
1281
    """
1282
 
    takes_args = ['dir?']
 
1282
    takes_args = ['branch?']
1283
1283
    takes_options = ['verbose']
1284
1284
 
1285
 
    def run(self, dir='.', verbose=False):
 
1285
    def run(self, branch=None, verbose=False):
1286
1286
        from bzrlib.check import check
1287
 
        check(WorkingTree.open_containing(dir)[0].branch, verbose)
 
1287
        if branch is None:
 
1288
            tree = WorkingTree.open_containing()[0]
 
1289
            branch = tree.branch
 
1290
        else:
 
1291
            branch = Branch.open(branch)
 
1292
        check(branch, verbose)
1288
1293
 
1289
1294
 
1290
1295
class cmd_scan_cache(Command):