/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/smart/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-26 21:34:42 UTC
  • mto: This revision was merged to the branch mainline in revision 6310.
  • Revision ID: jelmer@samba.org-20111126213442-0badm11xwh0dwc44
Add smart side of pack.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1024
1024
            repository.unlock()
1025
1025
        return SuccessfulSmartServerResponse(('ok', ))
1026
1026
 
 
1027
 
1027
1028
class SmartServerRepositoryAllRevisionIds(SmartServerRepositoryRequest):
1028
1029
    """Retrieve all of the revision ids in a repository.
1029
1030
 
1033
1034
    def do_repository_request(self, repository):
1034
1035
        revids = repository.all_revision_ids()
1035
1036
        return SuccessfulSmartServerResponse(("ok", ), "\n".join(revids))
 
1037
 
 
1038
 
 
1039
class SmartServerRepositoryPack(SmartServerRepositoryRequest):
 
1040
    """Pack a repository.
 
1041
 
 
1042
    New in 2.5.
 
1043
    """
 
1044
 
 
1045
    def do_repository_request(self, repository, hint, clean_obsolete_packs):
 
1046
        repository.pack(hint, clean_obsolete_packs)
 
1047
        return SuccessfulSmartServerResponse(("ok", ), )