[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100217: * net/tramp.el (tramp-do-fil
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100217: * net/tramp.el (tramp-do-file-attributes-with-stat): Add space in |
Date: |
Mon, 10 May 2010 17:50:30 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100217
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2010-05-10 17:50:30 +0200
message:
* net/tramp.el (tramp-do-file-attributes-with-stat): Add space in
format string, in order to work around a bug in pdksh. Reported
by Gilles Pion <address@hidden>.
(tramp-handle-verify-visited-file-modtime): Do not send a command
when the connection is not established.
(tramp-handle-set-file-times): Simplify the check for utc.
modified:
lisp/ChangeLog
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-05-10 14:48:17 +0000
+++ b/lisp/ChangeLog 2010-05-10 15:50:30 +0000
@@ -1,3 +1,12 @@
+2010-05-10 Michael Albinus <address@hidden>
+
+ * net/tramp.el (tramp-do-file-attributes-with-stat): Add space in
+ format string, in order to work around a bug in pdksh. Reported
+ by Gilles Pion <address@hidden>.
+ (tramp-handle-verify-visited-file-modtime): Do not send a command
+ when the connection is not established.
+ (tramp-handle-set-file-times): Simplify the check for utc.
+
2010-05-10 Juanma Barranquero <address@hidden>
Fix use of `filter-buffer-substring' (rework previous change).
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-05-09 19:57:55 +0000
+++ b/lisp/net/tramp.el 2010-05-10 15:50:30 +0000
@@ -2867,7 +2867,9 @@
(tramp-send-command-and-read
vec
(format
- "((%s %s || %s -h %s) && %s -c '((\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0
%%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)"
+ ;; On Opsware, pdksh (which is the true name of ksh there) doesn't
+ ;; parse correctly the sequence "((". Therefore, we add a space.
+ "( (%s %s || %s -h %s) && %s -c '( (\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0
%%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)"
(tramp-get-file-exists-command vec)
(tramp-shell-quote-argument localname)
(tramp-get-test-command vec)
@@ -2920,12 +2922,14 @@
function directly, unless those two cases are already taken care
of."
(with-current-buffer buf
- ;; There is no file visiting the buffer, or the buffer has no
- ;; recorded last modification time.
- (if (or (not (buffer-file-name))
- (eq (visited-file-modtime) 0))
- t
- (let ((f (buffer-file-name)))
+ (let ((f (buffer-file-name)))
+ ;; There is no file visiting the buffer, or the buffer has no
+ ;; recorded last modification time, or there is no established
+ ;; connection.
+ (if (or (not f)
+ (eq (visited-file-modtime) 0)
+ (not (tramp-file-name-handler 'file-remote-p f nil 'connected)))
+ t
(with-parsed-tramp-file-name f nil
(tramp-flush-file-property v localname)
(let* ((attr (file-attributes f))
@@ -2984,16 +2988,11 @@
(let ((time (if (or (null time) (equal time '(0 0)))
(current-time)
time))
- (utc
- ;; With GNU Emacs, `format-time-string' has an
- ;; optional parameter UNIVERSAL. This is preferred,
- ;; because we could handle the case when the remote
- ;; host is located in a different time zone as the
- ;; local host.
- (and (functionp 'subr-arity)
- (subrp (symbol-function 'format-time-string))
- (= 3 (cdr (tramp-compat-funcall
- 'subr-arity 'format-time-string))))))
+ ;; With GNU Emacs, `format-time-string' has an optional
+ ;; parameter UNIVERSAL. This is preferred, because we
+ ;; could handle the case when the remote host is
+ ;; located in a different time zone as the local host.
+ (utc (not (featurep 'xemacs))))
(tramp-send-command-and-check
v (format "%s touch -t %s %s"
(if utc "TZ=UTC; export TZ;" "")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100217: * net/tramp.el (tramp-do-file-attributes-with-stat): Add space in,
Michael Albinus <=