From: Glenn Morris Date: Sun, 2 Dec 2018 18:32:23 +0000 (-0800) Subject: Merge from origin/emacs-26 X-Git-Tag: emacs-27.0.90~4068 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d66f9fe5eebd98f2483c9416620c096d245f549;p=emacs.git Merge from origin/emacs-26 cc3ad9a ; * CONTRIBUTE: Clarify rules for committing to release branc... a89dbe2 * doc/misc/dbus.texi (Type Conversion): Fix typo. (Bug#33551) 03ee726 ; Add comment to `customize-package-emacs-version-alist' bce1d1a Improve documentation of gdb-mi.el --- 4d66f9fe5eebd98f2483c9416620c096d245f549 diff --cc lisp/net/trampver.el index ebd581b5f5a,9c1e9cfc2eb..b8684da8cf3 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@@ -38,38 -40,31 +38,42 @@@ (defconst tramp-bug-report-address "tramp-devel@gnu.org" "Email address to send bug reports to.") -(defun tramp-repository-get-version () - "Try to return as a string the repository revision of the Tramp sources." - (let ((dir (locate-dominating-file (locate-library "tramp") ".git"))) - (when dir - (with-temp-buffer - (let ((default-directory (file-name-as-directory dir))) - (and (zerop - (ignore-errors - (call-process "git" nil '(t nil) nil "rev-parse" "HEAD"))) - (not (zerop (buffer-size))) - (replace-regexp-in-string "\n" "" (buffer-string)))))))) +(defconst tramp-repository-branch + (ignore-errors + ;; Suppress message from `emacs-repository-get-branch'. We must + ;; also handle out-of-tree builds. + (let ((inhibit-message t) + (dir (or (locate-dominating-file (locate-library "tramp") ".git") + source-directory))) + ;; `emacs-repository-get-branch' has been introduced with Emacs 27.1. + (with-no-warnings + (and (stringp dir) (file-directory-p dir) + (emacs-repository-get-branch dir))))) + "The repository branch of the Tramp sources.") + +(defconst tramp-repository-version + (ignore-errors + ;; Suppress message from `emacs-repository-get-version'. We must + ;; also handle out-of-tree builds. + (let ((inhibit-message t) + (dir (or (locate-dominating-file (locate-library "tramp") ".git") + source-directory))) + (and (stringp dir) (file-directory-p dir) + (emacs-repository-get-version dir)))) + "The repository revision of the Tramp sources.") ;; Check for Emacs version. -(let ((x (if (>= emacs-major-version 24) - "ok" - (format "Tramp 2.3.5.26.2 is not fit for %s" - (when (string-match "^.*$" (emacs-version)) - (match-string 0 (emacs-version))))))) - (unless (string-match "\\`ok\\'" x) (error "%s" x))) +(let ((x (if (not (string-lessp emacs-version "24.1")) + "ok" + (format "Tramp 2.4.1-pre is not fit for %s" + (replace-regexp-in-string "\n" "" (emacs-version)))))) + (unless (string-equal "ok" x) (error "%s" x))) - ;; Tramp versions integrated into Emacs. + ;; Tramp versions integrated into Emacs. If a user option declares a + ;; `:package-version' which doesn't belong to an integrated Tramp + ;; version, it must be added here as well (see `tramp-syntax', for + ;; example). This can be checked by something like + ;; (customize-changed "26.1") (add-to-list 'customize-package-emacs-version-alist '(Tramp ("2.0.55" . "22.1") ("2.0.57" . "22.2") ("2.0.58-pre" . "22.3")