pack command...

Michael Andronov michael_andronov at sd-kyber.com
Thu Sep 16 02:46:42 BST 2010


Thanks a lot! Great help.

Michael.

On Wed, Sep 15, 2010 at 8:46 PM, Martin Pool <mbp at canonical.com> wrote:
> On 16 September 2010 04:38, Michael Andronov
> <michael_andronov at sd-kyber.com> wrote:
>> John -
>>
>> Thanks a lot for information provided.
>> It is much clear now.
>>
>> One more question, if I may -
>>
>> Is it possible - and how? (if it is) - to invoke 'pack' using bzrlib & python.
>
> Yes.  A good way to find how to do any thing in bzrlib is to trace
> down from builtins.py, where cmd_pack has simply:
>
>    def run(self, branch_or_repo='.', clean_obsolete_packs=False):
>        dir = bzrdir.BzrDir.open_containing(branch_or_repo)[0]
>        try:
>            branch = dir.open_branch()
>            repository = branch.repository
>        except errors.NotBranchError:
>            repository = dir.open_repository()
>        repository.pack(clean_obsolete_packs=clean_obsolete_packs)
>
> --
> Martin
>
>



More information about the bazaar mailing list