~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/weaverepo.py

  • Committer: John Arbash Meinel
  • Date: 2009-03-14 16:01:16 UTC
  • mto: (3735.2.156 brisbane-core)
  • mto: This revision was merged to the branch mainline in revision 4280.
  • Revision ID: john@arbash-meinel.com-20090314160116-jl91rchozkpvli4c
Change the parsing code to start out just holding the compressed bytes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Deprecated weave-based repository formats.
18
18
 
28
28
lazy_import(globals(), """
29
29
from bzrlib import (
30
30
    xml5,
31
 
    graph as _mod_graph,
32
31
    )
33
32
""")
34
33
from bzrlib import (
270
269
    supports_chks = False
271
270
    _fetch_order = 'topological'
272
271
    _fetch_reconcile = True
273
 
    fast_deltas = False
274
272
 
275
273
    def initialize(self, a_bzrdir, shared=False, _internal=False):
276
274
        """Create a weave repository."""
298
296
        try:
299
297
            transport.mkdir_multi(['revision-store', 'weaves'],
300
298
                mode=a_bzrdir._get_dir_mode())
301
 
            transport.put_bytes_non_atomic('inventory.weave', empty_weave,
302
 
                mode=a_bzrdir._get_file_mode())
 
299
            transport.put_bytes_non_atomic('inventory.weave', empty_weave)
303
300
        finally:
304
301
            control_files.unlock()
305
302
        return self.open(a_bzrdir, _found=True)
320
317
        result.chk_bytes = None
321
318
        return result
322
319
 
 
320
    def check_conversion_target(self, target_format):
 
321
        pass
 
322
 
323
323
 
324
324
class RepositoryFormat4(PreSplitOutRepositoryFormat):
325
325
    """Bzr repository format 4.
479
479
 
480
480
    _fetch_order = 'topological'
481
481
    _fetch_reconcile = True
482
 
    fast_deltas = False
483
482
    @property
484
483
    def _serializer(self):
485
484
        return xml5.serializer_v5
492
491
        """See RepositoryFormat.get_format_description()."""
493
492
        return "Weave repository format 7"
494
493
 
 
494
    def check_conversion_target(self, target_format):
 
495
        pass
 
496
 
495
497
    def _get_inventories(self, repo_transport, repo, name='inventory'):
496
498
        mapper = versionedfile.ConstantMapper(name)
497
499
        return versionedfile.ThunkedVersionedFiles(repo_transport,
664
666
            result[key] = parents
665
667
        return result
666
668
 
667
 
    def get_known_graph_ancestry(self, keys):
668
 
        """Get a KnownGraph instance with the ancestry of keys."""
669
 
        keys = self.keys()
670
 
        parent_map = self.get_parent_map(keys)
671
 
        kg = _mod_graph.KnownGraph(parent_map)
672
 
        return kg
673
 
 
674
669
    def get_record_stream(self, keys, sort_order, include_delta_closure):
675
670
        for key in keys:
676
671
            text, parents = self._load_text_parents(key)