BzrDir._find_or_create_repository KeyError (bzr+ssh + stacking policy?)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
>>> 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.
File "/home/
self.
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.
tags: | added: hpss |
Changed in bzr: | |
importance: | Undecided → High |
status: | New → Confirmed |
tags: | added: check-for-breezy |
-----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-----