So... I'm a bit curious if you couldn't mount with the right options and current umask so that the chmod isn't necessary, or is, at least, a no-op.
That would mean that the file mask should be exactly the directory mask, only without the executable bit (0777, 0666, umask 0000 for example, or 0775 0664 and a umask of 0002).
I certainly see this code in "local.py":
st = os.fstat(fd)
if mode is not None and mode != S_IMODE(st.st_mode):
# Because of umask, we may still need to chmod the file.
# But in the general case, we won't have to
os.chmod(abspath, mode)
Alternatively, bzrdir._dir_mode and _file_mode set the modes that we want to achieve, and they can be set to "None" to indicate we don't want to do any chmodding. At the moment, this is triggered when "transport.stat('directory')" raises TransportNotPossible.
So this simple plugin could do the trick:
from bzrlib import transport, errors
from bzrlib.transport import local
So... I'm a bit curious if you couldn't mount with the right options and current umask so that the chmod isn't necessary, or is, at least, a no-op.
That would mean that the file mask should be exactly the directory mask, only without the executable bit (0777, 0666, umask 0000 for example, or 0775 0664 and a umask of 0002).
I certainly see this code in "local.py": st.st_mode) : chmod(abspath, mode)
st = os.fstat(fd)
if mode is not None and mode != S_IMODE(
# Because of umask, we may still need to chmod the file.
# But in the general case, we won't have to
os.
Alternatively, bzrdir._dir_mode and _file_mode set the modes that we want to achieve, and they can be set to "None" to indicate we don't want to do any chmodding. At the moment, this is triggered when "transport. stat('directory ')" raises TransportNotPos sible.
So this simple plugin could do the trick:
from bzrlib import transport, errors
from bzrlib.transport import local
class AltLocal( local.LocalTran sport):
def stat(self, relpath): TransportNotPos sible()
raise errors.
transport. register_ transport( 'file:/ //', AltLocal)
Put the above code into a file like ~/.bazaar/ plugins/ no_local_ stat.py
And see if ntfs-3g starts working for you. There are certainly other things you could do, like test "self.base" for being inside the mount point, etc.