Matt Nordhoff wrote:
> Public bug reported:
>
>>>> from bzrlib.bzrdir import BzrDir
>>>> br = BzrDir.create_branch_and_repo('bzr+ssh://bazaar.staging.launchpad.net/~mnordhoff/bzr/test/')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/bzrdir.py", line 423, in create_branch_and_repo
> bzrdir._find_or_create_repository(force_new_repo)
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/bzrdir.py", line 490, in _find_or_create_repository
> return policy.acquire_repository()[0]
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/bzrdir.py", line 3661, in acquire_repository
> possible_transports=[self._bzrdir.root_transport])
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/bzrdir.py", line 2442, in require_stacking
> not self.repository_format.supports_external_lookups):
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/remote.py", line 500, in supports_external_lookups
> self._ensure_real()
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/remote.py", line 586, in _ensure_real
> self._network_name)
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/registry.py", line 263, in get
> r = Registry.get(self, format_string)
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/registry.py", line 173, in get
> return self._dict[self._get_key_or_default(key)].get_obj()
> File "/home/ubuntu/co/bzr/bazaar/bzr/bzr.dev/bzrlib/registry.py", line 191, in _get_key_or_default
> raise KeyError('Key is None, and no default key is set')
> KeyError: 'Key is None, and no default key is set'
>
> Note: The bzrdir is created just fine (obviously -- it fails on the line
> after that).
>
> It works fine if I pass a format argument.
>
> I can't reproduce this pushing to my own bzr+ssh server. It happens
> consistently on LP, though.
^- So I would assume LP fails because of the stacking policy, which you
almost certainly don't have set up on your own server.
I'm guessing the problem is that '_network_name' is not initialized yet,
so it is passing in None, and there isn't a default for that object.
I would offer that perhaps "create_branch_and_repo" with no format isn't
what you want to be doing. What format would it be creating? Would it be
compatible with whatever else you are doing? Stacking is checking
formats, so that it can make sure that you are allowed to stack the new
format on top of the old format.
status confirmed
importance low
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Matt Nordhoff wrote: create_ branch_ and_repo( 'bzr+ssh: //bazaar. staging. launchpad. net/~mnordhoff/ bzr/test/ ') ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ bzrdir. py", line 423, in create_ branch_ and_repo _find_or_ create_ repository( force_new_ repo) ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ bzrdir. py", line 490, in _find_or_ create_ repository acquire_ repository( )[0] ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ bzrdir. py", line 3661, in acquire_repository transports= [self._ bzrdir. root_transport] ) ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ bzrdir. py", line 2442, in require_stacking _format. supports_ external_ lookups) : ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ remote. py", line 500, in supports_ external_ lookups ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ remote. py", line 586, in _ensure_real ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ registry. py", line 263, in get ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ registry. py", line 173, in get self._get_ key_or_ default( key)].get_ obj() ubuntu/ co/bzr/ bazaar/ bzr/bzr. dev/bzrlib/ registry. py", line 191, in _get_key_or_default
> Public bug reported:
>
>>>> from bzrlib.bzrdir import BzrDir
>>>> br = BzrDir.
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/
> bzrdir.
> File "/home/
> return policy.
> File "/home/
> possible_
> File "/home/
> not self.repository
> File "/home/
> self._ensure_real()
> File "/home/
> self._network_name)
> File "/home/
> r = Registry.get(self, format_string)
> File "/home/
> return self._dict[
> File "/home/
> raise KeyError('Key is None, and no default key is set')
> KeyError: 'Key is None, and no default key is set'
>
> Note: The bzrdir is created just fine (obviously -- it fails on the line
> after that).
>
> It works fine if I pass a format argument.
>
> I can't reproduce this pushing to my own bzr+ssh server. It happens
> consistently on LP, though.
^- So I would assume LP fails because of the stacking policy, which you
almost certainly don't have set up on your own server.
I'm guessing the problem is that '_network_name' is not initialized yet,
so it is passing in None, and there isn't a default for that object.
I would offer that perhaps "create_ branch_ and_repo" with no format isn't
what you want to be doing. What format would it be creating? Would it be
compatible with whatever else you are doing? Stacking is checking
formats, so that it can make sure that you are allowed to stack the new
format on top of the old format.
status confirmed
importance low
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks emlcACgkQJdeBCY SNAAOwRACgofu39 nXp1TTWLDHTfY61 Hkrq rDnKff/ D+6JEytZNuj
odEAnA8Ow7xFV/
=muQa
-----END PGP SIGNATURE-----