Rev 2891: Review feedback. in http://people.ubuntu.com/~robertc/baz2.0/knit-repo
Robert Collins
robertc at robertcollins.net
Tue Oct 9 00:20:27 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/knit-repo
------------------------------------------------------------
revno: 2891
revision-id: robertc at robertcollins.net-20071008232014-8ztf3wevtj9xjikj
parent: robertc at robertcollins.net-20071005024137-kn7brcu07nu8cwl1
committer: Robert Collins <robertc at robertcollins.net>
branch nick: knit-repo
timestamp: Tue 2007-10-09 09:20:14 +1000
message:
Review feedback.
modified:
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py 2007-10-05 02:41:37 +0000
+++ b/bzrlib/repofmt/knitrepo.py 2007-10-08 23:20:14 +0000
@@ -77,8 +77,10 @@
class KnitRepository(MetaDirRepository):
"""Knit format repository."""
- # make an manually, or incorrectly initialised KnitRepository object
- # invalid
+ # These attributes are inherited from the Repository base class. Setting
+ # them to None ensures that if the constructor is changed to not initialize
+ # them, or a subclass fails to call the constructor, that an error will
+ # occur rather than the system working but generating incorrect data.
_commit_builder_class = None
_serializer = None
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-05 02:41:37 +0000
+++ b/bzrlib/repository.py 2007-10-08 23:20:14 +0000
@@ -1699,9 +1699,10 @@
children.
* an open routine which returns a Repository instance.
- There is one and only one format for every disk format. The actual
- repository types do not indicate disk format at all - only repo._format can
- be used to determine the disk format of a Repository instance.
+ There is one and only one Format subclass for each on-disk format. But
+ there can be one Repository subclass that is used for several different
+ formats. The _format attribute on a Repository instance can be used to
+ determine the disk format.
Formats are placed in an dict by their format string for reference
during opening. These should be subclasses of RepositoryFormat
More information about the bazaar-commits
mailing list