Known Bug? Opening Repository doesn't set format

John Arbash Meinel john at arbash-meinel.com
Sat Mar 15 11:07:15 GMT 2008


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

I just ran into a bug while writing some code to try to upgrade multiple
repositories.

Specifically, when I do:

 repo = Repository.open('repo')

and then I check:

 repo.bzrdir._format._repository_format

It doesn't actually match the existing format.

Or put in the sense of a test case:

repo = self.make_repository('repo', format='rich-root-pack')
opened_repo = Repository.open('repo')

self.assertEqual(repo.bzrdir._format._repository_format,
		 opened_repo.bzrdir._format._repository_format)

This is a problem because as part of the upgrade code, I would like to do:

repo.bzrdir.check_conversion_target(target_format)

which ends up calling
self._format._repository_format.check_conversion_target(target_format._repository_format)

However, when you open up a "rich-root-pack" repository, the bzrdir
thinks it has a "pack-0.92" repository.

Has anyone else run into this?

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

iD8DBQFH263jJdeBCYSNAAMRAhtGAKDKArsuB+wERPPyLqIlh9YGZuFgFgCdG2i/
yW4gASe7WNYfzdX9+nB/9oY=
=mRcu
-----END PGP SIGNATURE-----




More information about the bazaar mailing list