From c7db4c06c43c1caf7b51efb82ca7e7bad4fb9661 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 10 Feb 2014 14:54:33 +0100 Subject: [PATCH] * net/tramp-sh.el (tramp-sh-handle-vc-registered): Apply heredoc script more robustly. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp-sh.el | 27 ++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a2cdabc1f1..d67d626f131 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-02-10 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-vc-registered): Apply heredoc + script more robustly. + 2014-02-10 Lars Ingebrigtsen * dired.el (dired-get-marked-files): Doc fix (bug#11534). diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8d3c4c2c58b..fc906b343cb 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3308,15 +3308,24 @@ the result will be a local, non-Tramp, filename." (dolist (elt - (tramp-send-command-and-read - v - (format - "tramp_vc_registered_read_file_names <<'%s'\n%s\n%s\n" - tramp-end-of-heredoc - (mapconcat 'tramp-shell-quote-argument - tramp-vc-registered-file-names - "\n") - tramp-end-of-heredoc))) + (ignore-errors + ;; We cannot use `tramp-send-command-and-read', + ;; because this does not cooperate well with + ;; heredoc documents. + (tramp-send-command + v + (format + "tramp_vc_registered_read_file_names <<'%s'\n%s\n%s\n" + tramp-end-of-heredoc + (mapconcat 'tramp-shell-quote-argument + tramp-vc-registered-file-names + "\n") + tramp-end-of-heredoc)) + (tramp-send-command-and-check v nil) + (with-current-buffer (tramp-get-connection-buffer v) + ;; Read the expression. + (goto-char (point-min)) + (read (current-buffer))))) (tramp-set-file-property v (car elt) (cadr elt) (cadr (cdr elt)))))) -- 2.39.2