~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-07-13 06:10:29 UTC
  • mfrom: (2616 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2617.
  • Revision ID: aaron.bentley@utoronto.ca-20070713061029-9ebz58a3yvvax5du
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
2475
2475
        from bzrlib.tests import selftest
2476
2476
        import bzrlib.benchmarks as benchmarks
2477
2477
        from bzrlib.benchmarks import tree_creator
 
2478
        from bzrlib.version import show_version
2478
2479
 
2479
2480
        if cache_dir is not None:
2480
2481
            tree_creator.TreeCreator.CACHE_ROOT = osutils.abspath(cache_dir)
2481
 
        print '%10s: %s' % ('bzr', osutils.realpath(sys.argv[0]))
2482
 
        print '%10s: %s' % ('bzrlib', bzrlib.__path__[0])
 
2482
        if not list_only:
 
2483
            show_version(show_config=False, show_copyright=False)
2483
2484
        print
2484
2485
        if testspecs_list is not None:
2485
2486
            pattern = '|'.join(testspecs_list)
3068
3069
        return status_code
3069
3070
 
3070
3071
 
 
3072
class cmd_pack(Command):
 
3073
    """Compress the data within a repository."""
 
3074
 
 
3075
    _see_also = ['repositories']
 
3076
    takes_args = ['branch_or_repo?']
 
3077
 
 
3078
    def run(self, branch_or_repo='.'):
 
3079
        dir = bzrdir.BzrDir.open_containing(branch_or_repo)[0]
 
3080
        try:
 
3081
            branch = dir.open_branch()
 
3082
            repository = branch.repository
 
3083
        except errors.NotBranchError:
 
3084
            repository = dir.open_repository()
 
3085
        repository.pack()
 
3086
 
 
3087
 
3071
3088
class cmd_plugins(Command):
3072
3089
    """List plugins"""
3073
3090
    hidden = True