[BUG] Getting an empty knit tries to put
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Mar 31 20:48:52 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
Knits can't be used with a readonly source at the moment, because
attempting to pull them will cause bzr to attempt to put.
This happens when there are no versions in the knit, and
VersionedFileStore.get_weave_or_empty is called.
In KnitVersionedFile.__init__, if self.versions() is empty, it will not
only produce a new knit, but attempt to write it to the transport.
You can reproduce this problem yourself by branching from James' repo:
http://jblack.linuxguru.net/~jblack/bzr.dev.knit
Here's my traceback:
Traceback (most recent call last):
File "/home/abentley/bzr/spork/bzrlib/commands.py", line 650, in
run_bzr_catch_errors
return run_bzr(argv)
File "/home/abentley/bzr/spork/bzrlib/commands.py", line 612, in run_bzr
ret = run(*run_argv)
File "/home/abentley/bzr/spork/bzrlib/commands.py", line 246, in
run_argv_aliases
return self.run(**all_cmd_args)
File "/home/abentley/bzr/spork/bzrlib/builtins.py", line 591, in run
dir = br_from.bzrdir.sprout(to_location, revision_id, basis_dir)
File "/home/abentley/bzr/spork/bzrlib/bzrdir.py", line 526, in sprout
basis=basis_repo)
File "/home/abentley/bzr/spork/bzrlib/decorators.py", line 38, in
read_locked
return unbound(self, *args, **kwargs)
File "/home/abentley/bzr/spork/bzrlib/repository.py", line 226, in clone
self.copy_content_into(result, revision_id, basis)
File "/home/abentley/bzr/spork/bzrlib/repository.py", line 195, in
copy_content_into
return InterRepository.get(self,
destination).copy_content(revision_id, basis)
File "/home/abentley/bzr/spork/bzrlib/decorators.py", line 51, in
write_locked
return unbound(self, *args, **kwargs)
File "/home/abentley/bzr/spork/bzrlib/repository.py", line 1400, in
copy_content
self.target.fetch(self.source, revision_id=revision_id)
File "/home/abentley/bzr/spork/bzrlib/repository.py", line 203, in fetch
pb=pb)
File "/home/abentley/bzr/spork/bzrlib/decorators.py", line 51, in
write_locked return unbound(self, *args, **kwargs)
File "/home/abentley/bzr/spork/bzrlib/repository.py", line 1628, in fetch
pb=pb)
File "/home/abentley/bzr/spork/bzrlib/fetch.py", line 107, in __init__
self.__fetch()
File "/home/abentley/bzr/spork/bzrlib/fetch.py", line 137, in __fetch
self._fetch_revision_texts(revs)
File "/home/abentley/bzr/spork/bzrlib/fetch.py", line 269, in
_fetch_revision_texts
from_sf = self.from_repository._revision_store.get_signature_file(
File "/home/abentley/bzr/spork/bzrlib/store/revision/knit.py", line
103, in get_signature_file
return self.versioned_file_store.get_weave_or_empty('signatures',
transaction)
File "/home/abentley/bzr/spork/bzrlib/store/versioned/__init__.py",
line 156, in get_weave_or_empty
return self.get_weave(file_id, transaction)
File "/home/abentley/bzr/spork/bzrlib/store/versioned/__init__.py",
line 116, in get_weave
access_mode='r')
File "/home/abentley/bzr/spork/bzrlib/knit.py", line 283, in __init__
access_mode, create=not len(self.versions()))
File "/home/abentley/bzr/spork/bzrlib/knit.py", line 1088, in __init__
self._transport.put(self._filename, StringIO(''))
File "/home/abentley/bzr/spork/bzrlib/transport/http/__init__.py",
line 251, in put
raise TransportNotPossible('http PUT not supported')
TransportNotPossible: http PUT not supported
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFELYek0F+nu1YWqI0RAn+eAJ9evjAtHKYkXBq8QoF/+ChHuUgYEQCdEIXw
J0hx8wfKuM51NFlIIriHPew=
=ZunM
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list