[MERGE] Implement rich-root-pack format (#164639)

John Arbash Meinel john at arbash-meinel.com
Wed Nov 28 17:20:00 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Bentley wrote:
> Jelmer Vernooij wrote:
>> Am Sonntag, den 25.11.2007, 12:56 -0500 schrieb Aaron Bentley:
>>> Hi all,
>>>
>>> Following up on the rich-root format, this patch implements a packs
>>> variant called rich-root-pack.
>> btw, All references to the subtree formats are now gone in the bzr-svn
>> documentation and replaced by references to rich-root and
>> rich-root-packs (but mentioning it is experimental).
> 
> Great news!  I'm glad they work for you.
> 
>> I'll see if I can spend some time improving the error messages fetching
>> between dirstate and rich-root:
> 
>> bzr: ERROR: Repository
>> KnitRepository('file:///tmp/fool/.bzr/repository/') is not compatible
>> with repository KnitRepository('file:///tmp/bool/.bzr/repository/')
> 
> It would be nice if the error should pointed at bzr help formats.
> 
> Aaron

This is also a side effect of Robert's work to use a single KnitRepository
class that has a helper to distinguish between V1 and V3. So you used to get:

bzr: ERROR: Repository KnitRepository3('...') is not compatible with repository
KnitRepository1('...')

Which would at least give you a hint that you might be trying to downgrade.
Something like this might help:

=== modified file 'bzrlib/repofmt/knitrepo.py'
- --- bzrlib/repofmt/knitrepo.py  2007-11-18 18:42:17 +0000
+++ bzrlib/repofmt/knitrepo.py  2007-11-28 17:18:08 +0000
@@ -101,6 +101,9 @@
         return inv_vf.add_lines_with_ghosts(revid, parents, lines,
             check_content=check_content)[0]

+    def __repr__(self):
+        return '%s(%r, %s)' % (self.__class__.__name__,
+                               self.base, self._format.get_format_description())
     @needs_read_lock
     def _all_revision_ids(self):
         """See Repository.all_revision_ids()."""


It gives the error:
bzr: ERROR: Repository
KnitRepository('file:///Users/jameinel/dev/%2Ctmp/1/.bzr/repository/', Knit
repository format 1) is not compatible with repository
KnitRepository('file:///Users/jameinel/dev/%2Ctmp/3/.bzr/repository/', Knit
repository format 3)

It is still an overly ugly error, and doesn't tell you *why* they are
incompatible. But at least it gives some hints about it.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTaNAJdeBCYSNAAMRAqbUAJ9HDRC5lJR35OTL1P9PbgjqfU8fIACfZw/6
RQEK36VT9cDlk1jRFqWM7MU=
=QGQA
-----END PGP SIGNATURE-----



More information about the bazaar mailing list