emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104260: * net/tramp.el (tramp-handle


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104260: * net/tramp.el (tramp-handle-insert-file-contents): Use "dd"
Date: Tue, 17 May 2011 14:47:55 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104260
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2011-05-17 14:47:55 +0200
message:
  * net/tramp.el (tramp-handle-insert-file-contents): Use "dd"
  instead of "head" and "tail".  There were problems with SunOS 5.9,
  and it performs better.
modified:
  lisp/ChangeLog
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-05-17 02:40:34 +0000
+++ b/lisp/ChangeLog    2011-05-17 12:47:55 +0000
@@ -1,3 +1,9 @@
+2011-05-17  Michael Albinus  <address@hidden>
+
+       * net/tramp.el (tramp-handle-insert-file-contents): Use "dd"
+       instead of "head" and "tail".  There were problems with SunOS 5.9,
+       and it performs better.
+
 2011-05-17  Glenn Morris  <address@hidden>
 
        * mail/mail-utils.el (mail-dont-reply-to): Silence compiler.

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2011-05-05 04:00:38 +0000
+++ b/lisp/net/tramp.el 2011-05-17 12:47:55 +0000
@@ -2838,16 +2838,16 @@
                 v
                 (cond
                  ((and beg end)
-                  (format "tail -c +%d %s | head -c +%d >%s"
-                          (1+ beg) (tramp-shell-quote-argument localname)
+                  (format "dd bs=1 skip=%d if=%s count=%d of=%s"
+                          beg (tramp-shell-quote-argument localname)
                           (- end beg) remote-copy))
                  (beg
-                  (format "tail -c +%d %s >%s"
-                          (1+ beg) (tramp-shell-quote-argument localname)
+                  (format "dd bs=1 skip=%d if=%s of=%s"
+                          beg (tramp-shell-quote-argument localname)
                           remote-copy))
                  (end
-                  (format "head -c +%d %s >%s"
-                          (1+ end) (tramp-shell-quote-argument localname)
+                  (format "dd bs=1 count=%d if=%s of=%s"
+                          end (tramp-shell-quote-argument localname)
                           remote-copy)))))
 
              ;; `insert-file-contents-literally' takes care to avoid


reply via email to

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