/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: Canonical.com Patch Queue Manager
  • Date: 2007-07-12 13:35:54 UTC
  • mfrom: (2604.2.1 pack)
  • Revision ID: pqm@pqm.ubuntu.com-20070712133554-r8me4pz4j68p2ytf
(robertc) Introduce a pack command.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3068
3068
        return status_code
3069
3069
 
3070
3070
 
 
3071
class cmd_pack(Command):
 
3072
    """Compress the data within a repository."""
 
3073
 
 
3074
    _see_also = ['repositories']
 
3075
    takes_args = ['branch_or_repo?']
 
3076
 
 
3077
    def run(self, branch_or_repo='.'):
 
3078
        dir = bzrdir.BzrDir.open_containing(branch_or_repo)[0]
 
3079
        try:
 
3080
            branch = dir.open_branch()
 
3081
            repository = branch.repository
 
3082
        except errors.NotBranchError:
 
3083
            repository = dir.open_repository()
 
3084
        repository.pack()
 
3085
 
 
3086
 
3071
3087
class cmd_plugins(Command):
3072
3088
    """List plugins"""
3073
3089
    hidden = True