/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/repofmt/groupcompress_repo.py

  • Committer: Jelmer Vernooij
  • Date: 2010-03-21 21:39:33 UTC
  • mfrom: (5102 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5143.
  • Revision ID: jelmer@samba.org-20100321213933-fexeh9zcoz8oaju2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
29
29
    knit,
30
30
    osutils,
31
31
    pack,
32
 
    remote,
33
32
    revision as _mod_revision,
34
33
    trace,
35
34
    ui,
353
352
        """Build a VersionedFiles instance on top of this group of packs."""
354
353
        index_name = index_name + '_index'
355
354
        index_to_pack = {}
356
 
        access = knit._DirectPackAccess(index_to_pack)
 
355
        access = knit._DirectPackAccess(index_to_pack,
 
356
                                        reload_func=self._reload_func)
357
357
        if for_write:
358
358
            # Use new_pack
359
359
            if self.new_pack is None:
704
704
                self._remove_pack_from_memory(pack)
705
705
        # record the newly available packs and stop advertising the old
706
706
        # packs
707
 
        result = self._save_pack_names(clear_obsolete_packs=True)
708
 
        # Move the old packs out of the way now they are no longer referenced.
709
 
        for revision_count, packs in pack_operations:
710
 
            self._obsolete_packs(packs)
 
707
        to_be_obsoleted = []
 
708
        for _, packs in pack_operations:
 
709
            to_be_obsoleted.extend(packs)
 
710
        result = self._save_pack_names(clear_obsolete_packs=True,
 
711
                                       obsolete_packs=to_be_obsoleted)
711
712
        return result
712
713
 
713
714
 
880
881
            if basis_tree is not None:
881
882
                basis_tree.unlock()
882
883
 
883
 
    def deserialise_inventory(self, revision_id, bytes):
 
884
    def _deserialise_inventory(self, revision_id, bytes):
884
885
        return inventory.CHKInventory.deserialise(self.chk_bytes, bytes,
885
886
            (revision_id,))
886
887
 
902
903
    def _iter_inventory_xmls(self, revision_ids, ordering):
903
904
        # Without a native 'xml' inventory, this method doesn't make sense.
904
905
        # However older working trees, and older bundles want it - so we supply
905
 
        # it allowing get_inventory_xml to work. Bundles currently use the
 
906
        # it allowing _get_inventory_xml to work. Bundles currently use the
906
907
        # serializer directly; this also isn't ideal, but there isn't an xml
907
908
        # iteration interface offered at all for repositories. We could make
908
909
        # _iter_inventory_xmls be part of the contract, even if kept private.