~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to repofmt.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-13 22:06:03 UTC
  • mfrom: (0.20.4 trunk)
  • mto: (0.20.6 trunk)
  • mto: This revision was merged to the branch mainline in revision 4280.
  • Revision ID: john@arbash-meinel.com-20090213220603-5d2k6544y55dd6bi
Bring in the trunk simplifications.

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
                _commit_builder_class, _serializer)
314
314
            # and now replace everything it did :)
315
315
            index_transport = self._transport.clone('indices')
316
 
            if chk_support:
317
 
                self._pack_collection = GCRepositoryPackCollection(self,
318
 
                    self._transport, index_transport,
319
 
                    self._transport.clone('upload'),
320
 
                    self._transport.clone('packs'),
321
 
                    _format.index_builder_class,
322
 
                    _format.index_class,
323
 
                    use_chk_index=self._format.supports_chks,
324
 
                    )
325
 
            else:
326
 
                self._pack_collection = GCRepositoryPackCollection(self,
327
 
                    self._transport, index_transport,
328
 
                    self._transport.clone('upload'),
329
 
                    self._transport.clone('packs'),
330
 
                    _format.index_builder_class,
331
 
                    _format.index_class)
 
316
            self._pack_collection = GCRepositoryPackCollection(self,
 
317
                self._transport, index_transport,
 
318
                self._transport.clone('upload'),
 
319
                self._transport.clone('packs'),
 
320
                _format.index_builder_class,
 
321
                _format.index_class,
 
322
                use_chk_index=self._format.supports_chks,
 
323
                )
332
324
            self.inventories = GroupCompressVersionedFiles(
333
325
                _GCGraphIndex(self._pack_collection.inventory_index.combined_index,
334
326
                    add_callback=self._pack_collection.inventory_index.add_callback,
351
343
                    add_callback=self._pack_collection.text_index.add_callback,
352
344
                    parents=True, is_locked=self.is_locked),
353
345
                access=self._pack_collection.text_index.data_access)
354
 
            if chk_support and _format.supports_chks:
355
 
                # No graph, no compression:- references from chks are between
356
 
                # different objects not temporal versions of the same; and without
357
 
                # some sort of temporal structure knit compression will just fail.
358
 
                self.chk_bytes = GroupCompressVersionedFiles(
359
 
                    _GCGraphIndex(self._pack_collection.chk_index.combined_index,
360
 
                        add_callback=self._pack_collection.chk_index.add_callback,
361
 
                        parents=False, is_locked=self.is_locked),
362
 
                    access=self._pack_collection.chk_index.data_access)
363
 
            else:
364
 
                self.chk_bytes = None
 
346
            assert _format.supports_chks
 
347
            # No parents, individual CHK pages don't have specific ancestry
 
348
            self.chk_bytes = GroupCompressVersionedFiles(
 
349
                _GCGraphIndex(self._pack_collection.chk_index.combined_index,
 
350
                    add_callback=self._pack_collection.chk_index.add_callback,
 
351
                    parents=False, is_locked=self.is_locked),
 
352
                access=self._pack_collection.chk_index.data_access)
365
353
            # True when the repository object is 'write locked' (as opposed to the
366
 
            # physical lock only taken out around changes to the pack-names list.) 
 
354
            # physical lock only taken out around changes to the pack-names list.)
367
355
            # Another way to represent this would be a decorator around the control
368
356
            # files object that presents logical locks as physical ones - if this
369
357
            # gets ugly consider that alternative design. RBC 20071011
437
425
            """See RepositoryFormat.get_format_description()."""
438
426
            return ("Development repository format - chk+groupcompress")
439
427
 
 
428
 
440
429
    class RepositoryFormatPackGCPlainCHK16(RepositoryFormatPackDevelopment5Hash16):
441
430
        """A hashed CHK+group compress pack repository."""
442
431
 
452
441
            return ("Development repository format - hash16chk+groupcompress")
453
442
 
454
443
 
455
 
 
456
 
 
457
 
 
458
444
def pack_incompatible(source, target, orig_method=InterPackRepo.is_compatible):
459
445
    """Be incompatible with the regular fetch code."""
460
446
    formats = (RepositoryFormatPackGCPlain, RepositoryFormatPackGCRichRoot,