emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116400: * net/tramp-sh.el (tramp-sh-handle-vc-regis


From: Michael Albinus
Subject: [Emacs-diffs] trunk r116400: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Apply heredoc
Date: Mon, 10 Feb 2014 13:54:45 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116400
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2014-02-10 14:54:33 +0100
message:
  * net/tramp-sh.el (tramp-sh-handle-vc-registered): Apply heredoc
  script more robustly.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-02-10 13:22:14 +0000
+++ b/lisp/ChangeLog    2014-02-10 13:54:33 +0000
@@ -1,3 +1,8 @@
+2014-02-10  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-sh-handle-vc-registered): Apply heredoc
+       script more robustly.
+
 2014-02-10  Lars Ingebrigtsen  <address@hidden>
 
        * dired.el (dired-get-marked-files): Doc fix (bug#11534).

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-02-10 13:22:14 +0000
+++ b/lisp/net/tramp-sh.el      2014-02-10 13:54:33 +0000
@@ -3308,15 +3308,24 @@
 
            (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))))))


reply via email to

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