Read-only tree can't read head (Re: Web interface update)
Lalo Martins
lalo at laranja.org
Sat May 21 18:02:02 BST 2005
Martin Pool wrote:
> On 9 May 2005, Chris McCormick <chris at mccormick.cx> wrote:
>>Your web user now needs write access to .bzr so locking can work.
> Branch(base, lock_mode='r')
>
> if you want only read access to it.
Martin,
while working with bzrweb today, I noticed this is not sufficient. It
allows you to view logs and files in past revisions, etc, but if you try
to view something in the head, you get something like:
Traceback (most recent call last):
File "bzrserver.py", line 73, in showPage
return (200, "Script output follows") + \
File "/repo/src/bzrweb.lalo/bzrweb.py", line 153, in showPage
patchtext = self.webcommands[arguments[0]](arguments[2:])
File "/repo/src/bzrweb.lalo/bzrweb.py", line 431, in export
tree = b.working_tree()
File "/repo/src/bzr.dev/bzrlib/branch.py", line 587, in working_tree
return WorkingTree(self.base, self.read_working_inventory())
File "/repo/src/bzr.dev/bzrlib/workingtree.py", line 40, in __init__
self._update_statcache()
File "/repo/src/bzr.dev/bzrlib/workingtree.py", line 97, in
_update_statcache
self._statcache = statcache.update_cache(self.basedir, self.inventory)
File "/repo/src/bzr.dev/bzrlib/statcache.py", line 209, in update_cache
return _update_cache_from_list(basedir, cache,
_files_from_inventory(inv))
File "/repo/src/bzr.dev/bzrlib/statcache.py", line 266, in
_update_cache_from_list
_write_cache(basedir, cache.itervalues(), dangerfiles)
File "/repo/src/bzr.dev/bzrlib/statcache.py", line 114, in _write_cache
outf = AtomicFile(cachefn, 'wb')
File "/repo/src/bzr.dev/bzrlib/atomicfile.py", line 39, in __init__
self.f = open(self.tmpfilename, mode)
IOError: [Errno 13] Permission denied:
'/repo/src/yi-meiyou/.bzr/stat-cache.28558.salmao.tmp'
where basically, the WorkingTree is trying to update its stat cache, and
write the updated cache to .bzr.
I figure we need a ReadOnlyWorkingTree?
best,
Lalo Martins
--
It doesn't bother me that people say things like
"you'll never get anywhere with this attitude".
In a few decades, it will make a good paragraph
in my biography. You know, for a laugh.
--
http://www.laranja.org/ mailto:lalo at laranja.org
pgp key: http://www.laranja.org/pessoal/pgp
More information about the bazaar
mailing list