emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 1f50379: Sync with Tramp 2.3.4. Do not merge with


From: Michael Albinus
Subject: [Emacs-diffs] emacs-26 1f50379: Sync with Tramp 2.3.4. Do not merge with master
Date: Wed, 27 Jun 2018 07:08:27 -0400 (EDT)

branch: emacs-26
commit 1f5037925b0830b4129f3d6388f139e339f60da3
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Sync with Tramp 2.3.4.  Do not merge with master
    
    * doc/misc/trampver.texi:
    * lisp/net/trampver.el: Change version to "2.3.4".
    
    * lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
    Check, that the directory has been removed indeed.
    
    * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Adapt test.
    (tramp--test-emacs25-p): New defun.
    (tramp-test34-vc-registered): Use it.
---
 doc/misc/trampver.texi       |  2 +-
 lisp/net/tramp-smb.el        |  7 ++++++-
 lisp/net/trampver.el         |  6 +++---
 test/lisp/net/tramp-tests.el | 16 ++++++++++------
 4 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 68619dc..0970e4e 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
 @c In the Tramp GIT, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
address@hidden trampver 2.3.4-pre
address@hidden trampver 2.3.4
 
 @c Other flags from configuration
 @set instprefix /usr/local
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 7e96142..5bcb082 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -642,7 +642,12 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
          (goto-char (point-min))
          (search-forward-regexp tramp-smb-errors nil t)
          (tramp-error
-          v 'file-error "%s `%s'" (match-string 0) directory))))))
+          v 'file-error "%s `%s'" (match-string 0) directory)))
+
+      ;; "rmdir" does not report an error.  So we check ourselves.
+      (when (file-exists-p directory)
+       (tramp-error
+        v 'file-error "`%s' not removed." directory)))))
 
 (defun tramp-smb-handle-delete-file (filename &optional _trash)
   "Like `delete-file' for Tramp files."
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 2549841..d02e6bc 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Michael Albinus <address@hidden>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.3.4-pre
+;; Version: 2.3.4
 
 ;; This file is part of GNU Emacs.
 
@@ -33,7 +33,7 @@
 ;; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.3.4-pre"
+(defconst tramp-version "2.3.4"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -55,7 +55,7 @@
 ;; Check for Emacs version.
 (let ((x (if (>= emacs-major-version 24)
     "ok"
-  (format "Tramp 2.3.4-pre is not fit for %s"
+  (format "Tramp 2.3.4 is not fit for %s"
          (when (string-match "^.*$" (emacs-version))
            (match-string 0 (emacs-version)))))))
   (unless (string-match "\\`ok\\'" x) (error "%s" x)))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index d2cbebd..e70f00e 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2771,7 +2771,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
 
       ;; Check `add-name-to-file'.
       (unwind-protect
-         (progn
+         (unless (tramp-smb-file-name-p tramp-test-temporary-file-directory)
            (write-region "foo" nil tmp-name1)
            (should (file-exists-p tmp-name1))
            (add-name-to-file tmp-name1 tmp-name2)
@@ -3802,11 +3802,9 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
                  (vc-register
                   (list (car vc-handled-backends)
                         (list (file-name-nondirectory tmp-name2))))
-               ;; `vc-register' has changed its arguments in Emacs 25.1.
-               (error
-                (vc-register
-                 nil (list (car vc-handled-backends)
-                           (list (file-name-nondirectory tmp-name2))))))
+               ;; `vc-register' has changed its arguments in Emacs
+               ;; 25.1.  Let's skip it for older Emacsen.
+               (error (skip-unless (tramp--test-emacs25-p))))
              ;; vc-git uses an own process sentinel, Tramp's sentinel
              ;; for flushing the cache isn't used.
              (dired-uncache (concat (file-remote-p default-directory) "/"))
@@ -4053,6 +4051,12 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
     (delete-directory tmp-file)
     (should-not (file-exists-p tmp-file))))
 
+(defun tramp--test-emacs25-p ()
+  "Check for Emacs version >= 25.1.
+Some semantics has been changed for there, w/o new functions or
+variables, so we check the Emacs version directly."
+  (>= emacs-major-version 25))
+
 (defun tramp--test-emacs26-p ()
   "Check for Emacs version >= 26.1.
 Some semantics has been changed for there, w/o new functions or



reply via email to

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