sshfs support? (Fw question from ru_bzr group)
Alexander Belchenko
bialix at ukr.net
Sun Dec 23 13:29:37 GMT 2007
One user reported in ru_bzr discussion group about problems with bzr
working on sshfs filesystem. The problem itself lies in the fact that
sshfs don't support rename over the top of file.
E.g. even second `bzr ignore` command fails with error "Operation not
permitted".
$ sshfs --version
SSHFS version 1.6
$ bzr --version
Bazaar (bzr) 0.92.0
$bzr ignore -Derror a
bzr: ERROR: exceptions.OSError: [Errno 1] Operation not permitted
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 802,
in run_bzr_catch_errors
return run_bzr(argv)
File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 758,
in run_bzr
ret = run(*run_argv)
File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492,
in run_argv_aliases
return self.run(**all_cmd_args)
File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 1968,
in run
f.commit()
File "/usr/lib/python2.4/site-packages/bzrlib/atomicfile.py", line
111, in commit
osutils.rename(self.tmpfilename, self.realfilename)
OSError: [Errno 1] Operation not permitted
Because for sftp support we used fancy_rename,
I recommend to change in osutils.py line 373:
rename = os.rename
to
rename = _win32_rename
And this change actually helps to this user.
And now I have question: do I need file a bug about sshfs?
I wonder on Linux rename could be more complex thing, i.e.
def _linux_rename(old, new):
try:
os.rename(old,new)
except OSError, e:
if e.errno != errno.EPERM:
raise
fancy_rename(old, new)
Or something similar? Am I wrong here? Or bzr will not plan to support
sshfs at all?
This user said that git too unable to work on sshfs, and only Mercurial
works without problems.
Alexander
More information about the bazaar
mailing list