bzr 1.0.0.candidate.3: ERROR: Permission denied: [Errno 13]
Jari Aalto
jari.aalto at cante.net
Thu Dec 13 15:42:38 GMT 2007
* Thu 2007-12-13 John Arbash Meinel <john at arbash-meinel.com>
* Message-Id: 47614D89.40002 at arbash-meinel.com
#! /usr/bin/env python
import os
from bzrlib import branch
b = branch.Branch.open('.')
print '%04o %04o' % (b.control_files._dir_mode, b.control_files._file_mode)
fname = 't.tmp'
st = os.stat(fname)
print '%04o' % (st.st_mode)
Traceback (most recent call last):
File "/cygdrive/x/home/jaalto/tmp/t2.py", line 5, in <module>
b = branch.Branch.open('.')
File "branch.py", line 128, in open
File "bzrdir.py", line 572, in open
File "bzrdir.py", line 609, in open_from_transport
File "lazy_import.py", line 125, in __call__
File "__init__.py", line 1661, in do_catching_redirections
File "bzrdir.py", line 586, in find_format
File "bzrdir.py", line 1311, in find_format
bzrlib.errors.NotBranchError: Not a branch: "/cygdrive/x/home/jaalto/vc/git/shell-my-init/".
You might also try a patch like:
=== modified file 'bzrlib/lockable_files.py'
- --- bzrlib/lockable_files.py 2007-08-15 04:33:34 +0000
+++ bzrlib/lockable_files.py 2007-12-13 15:16:45 +0000
@@ -132,7 +132,9 @@
self._dir_mode = 0755
self._file_mode = 0644
else:
- - self._dir_mode = st.st_mode & 07777
+ # Always set user read-write
+ self._dir_mode = (st.st_mode & 07777) | 00600
+
# Remove the sticky and execute bits for files
self._file_mode = self._dir_mode & ~07111
if not self._set_dir_mode:
Since it seems like when we check we get a readonly directory returned, which
> is causing us to try and create the files in readonly mode (which doesn't work
> so well).
Excellent! This worked, thanks.
Jari
--
Welcome to FOSS revolution: we fix and modify until it shines
More information about the bazaar
mailing list