[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails

From: Stefan Monnier
Subject: Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
Date: Sun, 13 Nov 2005 18:19:00 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>>> I've reproduced the problem with more verbosity.  I was confused about
>>>> svn in my last report - it's absent on the _remote_ host (not
>>>> available in the default path).
>> If svn is absent on the machine where it's run, vc-svn-command is expected
>> (by vc-svn.el) to signal a `file-error'.  Maybe the Tramp handling of
>> process-file signals a plain `error' in such a situation instead.  In that
>> case, fixing Tramp to signal the proper error should fix your
>> problem.

> Finally, Tramp's implementation of shell-command is called. This runs
> the command without any check, and returns the return status from the
> remote host. One could try to improve it, with the disadvantage of
> more overhead.

Then does the patch below fix the problem acceptably (and does the comment
correctly describe the problem)?


--- vc-svn.el   20 aoĆ» 2005 19:26:18 -0400      1.21
+++ vc-svn.el   13 nov 2005 18:17:59 -0500      
@@ -116,8 +116,11 @@
       (cd (file-name-directory file))
       (condition-case nil
          (vc-svn-command t 0 file "status" "-v")
-       ;; We can't find an `svn' executable.  We could also deregister SVN.
-       (file-error nil))
+       ;; Some problem happened.  E.g. We can't find an `svn' executable.
+        ;; We used to only catch `file-error' but when the process is run on
+        ;; a remote host via Tramp, the error is only reported via the
+        ;; exit status which is turned into an `error' by vc-do-command.
+       (error nil))
       (vc-svn-parse-status t)
       (eq 'SVN (vc-file-getprop file 'vc-backend)))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]