unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
       [not found] <877jbclb1d.fsf@zemdatav.stor.no-ip.org>
@ 2005-11-13 17:37 ` Michael Albinus
  2005-11-13 21:22   ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2005-11-13 17:37 UTC (permalink / raw)
  Cc: tramp-devel, emacs-devel

Magnus Henoch <mange@freemail.hu> writes:

> 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).

That's simple to solve in your .emacs:

(add-to-list 'tramp-remote-path "/path/to/svn/dir")

Best regards, Michael.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
  2005-11-13 17:37 ` tramp (2.0.51); Saving SVN-managed files over Tramp fails Michael Albinus
@ 2005-11-13 21:22   ` Stefan Monnier
  2005-11-13 22:27     ` Michael Albinus
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2005-11-13 21:22 UTC (permalink / raw)
  Cc: tramp-devel, Magnus Henoch, emacs-devel

>> 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.


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
  2005-11-13 21:22   ` Stefan Monnier
@ 2005-11-13 22:27     ` Michael Albinus
  2005-11-13 23:19       ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2005-11-13 22:27 UTC (permalink / raw)
  Cc: tramp-devel, Magnus Henoch, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> 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.

>         Stefan

Best regards, Michael.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
  2005-11-13 22:27     ` Michael Albinus
@ 2005-11-13 23:19       ` Stefan Monnier
  2005-11-13 23:41         ` Michael Albinus
  2005-11-13 23:53         ` Magnus Henoch
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2005-11-13 23:19 UTC (permalink / raw)
  Cc: tramp-devel, Magnus Henoch, emacs-devel

>>>> 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)?


        Stefan


--- 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)))))
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
  2005-11-13 23:19       ` Stefan Monnier
@ 2005-11-13 23:41         ` Michael Albinus
  2005-11-14  4:32           ` Stefan Monnier
  2005-11-13 23:53         ` Magnus Henoch
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2005-11-13 23:41 UTC (permalink / raw)
  Cc: tramp-devel, Magnus Henoch, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

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

That looks fine to me. But shouldn't the other vc backends behave the
same way? Or should vc-do-command raise a file-error? (Or should Tramp
check the command existence, and raise a file-error?)

>         Stefan

Best regards, Michael.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
  2005-11-13 23:19       ` Stefan Monnier
  2005-11-13 23:41         ` Michael Albinus
@ 2005-11-13 23:53         ` Magnus Henoch
  1 sibling, 0 replies; 7+ messages in thread
From: Magnus Henoch @ 2005-11-13 23:53 UTC (permalink / raw)
  Cc: tramp-devel, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

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

It does fix the problem.

Magnus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp (2.0.51); Saving SVN-managed files over Tramp fails
  2005-11-13 23:41         ` Michael Albinus
@ 2005-11-14  4:32           ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2005-11-14  4:32 UTC (permalink / raw)
  Cc: tramp-devel, Magnus Henoch, emacs-devel

>> Then does the patch below fix the problem acceptably (and does the comment
>> correctly describe the problem)?
> That looks fine to me.  But shouldn't the other vc backends behave the
> same way?

Most other backends don't need to run any command just to figure out whether
a file is under VC control or not.  Actually vc-arch.el probably should but
it doesn't (`tla' doesn't really provide the right command for it anyway).

> Or should vc-do-command raise a file-error?

vc-do-command can't know whether it's a file-error or something else.

> (Or should Tramp check the command existence, and raise a file-error?)

That'd be good, but if it comes at a performance price, it's not clear it's
worth the trouble.


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-14  4:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <877jbclb1d.fsf@zemdatav.stor.no-ip.org>
2005-11-13 17:37 ` tramp (2.0.51); Saving SVN-managed files over Tramp fails Michael Albinus
2005-11-13 21:22   ` Stefan Monnier
2005-11-13 22:27     ` Michael Albinus
2005-11-13 23:19       ` Stefan Monnier
2005-11-13 23:41         ` Michael Albinus
2005-11-14  4:32           ` Stefan Monnier
2005-11-13 23:53         ` Magnus Henoch

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).