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

  • Committer: Robert Collins
  • Date: 2007-10-05 02:41:37 UTC
  • mto: (2592.3.166 repository)
  • mto: This revision was merged to the branch mainline in revision 2896.
  • Revision ID: robertc@robertcollins.net-20071005024137-kn7brcu07nu8cwl1
* The class ``bzrlib.repofmt.knitrepo.KnitRepository3`` has been folded into
  ``KnitRepository`` by parameters to the constructor. (Robert Collins)
* ``bzrlib.xml_serializer.Serializer`` is now responsible for checking that
  mandatory attributes are present on serialisation and deserialisation.
  This fixes some holes in API usage and allows better separation between
  physical storage and object serialisation. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1196
1196
        :param xml: A serialised inventory.
1197
1197
        """
1198
1198
        revision_id = osutils.safe_revision_id(revision_id)
1199
 
        result = self._serializer.read_inventory_from_string(xml)
1200
 
        result.root.revision = revision_id
 
1199
        result = self._serializer.read_inventory_from_string(xml, revision_id)
1201
1200
        return result
1202
1201
 
1203
1202
    def serialise_inventory(self, inv):
1671
1670
 
1672
1671
 
1673
1672
class RepositoryFormatRegistry(registry.Registry):
1674
 
    """Registry of RepositoryFormats.
1675
 
    """
 
1673
    """Registry of RepositoryFormats."""
1676
1674
 
1677
1675
    def get(self, format_string):
1678
1676
        r = registry.Registry.get(self, format_string)
1701
1699
       children.
1702
1700
     * an open routine which returns a Repository instance.
1703
1701
 
 
1702
    There is one and only one format for every disk format. The actual
 
1703
    repository types do not indicate disk format at all - only repo._format can
 
1704
    be used to determine the disk format of a Repository instance.
 
1705
 
1704
1706
    Formats are placed in an dict by their format string for reference 
1705
1707
    during opening. These should be subclasses of RepositoryFormat
1706
1708
    for consistency.