aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-04-07 12:51:51 -0700
committerGlenn Morris2012-04-07 12:51:51 -0700
commita1ed8b05eedc1bded036d1c35a867fbdc7a1eba2 (patch)
treeea491cfee820029fafd1162d50abc7a834674aed
parente3fb2efb80ee8beebf7963228c4508496ebf24fa (diff)
downloademacs-a1ed8b05eedc1bded036d1c35a867fbdc7a1eba2.tar.gz
emacs-a1ed8b05eedc1bded036d1c35a867fbdc7a1eba2.zip
Add emacs-bzr-version
* lisp/version.el (emacs-bzr-get-version): New function. * lisp/loadup.el (emacs-bzr-version): Set it. * lisp/mail/emacsbug.el (report-emacs-bug): Include bzr version. * etc/NEWS: Mention this, though it is not really relevant to releases. Insert template for 24.2 release. Fixes: debbugs:8054
-rw-r--r--etc/NEWS28
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/loadup.el2
-rw-r--r--lisp/mail/emacsbug.el2
-rw-r--r--lisp/version.el20
5 files changed, 57 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index f97003d8fd0..ae6ba8d36b7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1,6 +1,6 @@
1GNU Emacs NEWS -- history of user-visible changes. 1GNU Emacs NEWS -- history of user-visible changes.
2 2
3Copyright (C) 2010-2012 Free Software Foundation, Inc. 3Copyright (C) 2010-2012 Free Software Foundation, Inc.
4See the end of the file for license conditions. 4See the end of the file for license conditions.
5 5
6Please send Emacs bug reports to bug-gnu-emacs@gnu.org. 6Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
@@ -14,6 +14,32 @@ and NEWS.1-17 for changes in older Emacs versions.
14You can narrow news to a specific version by calling `view-emacs-news' 14You can narrow news to a specific version by calling `view-emacs-news'
15with a prefix argument or by typing C-u C-h C-n. 15with a prefix argument or by typing C-u C-h C-n.
16 16
17Temporary note:
18+++ indicates that the appropriate manual has already been updated.
19--- means no change in the manuals is called for.
20When you add a new item, please add it without either +++ or ---
21so we will look at it and add it to the manual.
22
23
24* Installation Changes in Emacs 24.2
25
26* Startup Changes in Emacs 24.2
27
28* Changes in Emacs 24.2
29
30** If your Emacs was built from a bzr checkout, the new variable
31`emacs-bzr-version' contains information about which bzr revision was used.
32
33
34* Editing Changes in Emacs 24.2
35
36* Changes in Specialized Modes and Packages in Emacs 24.2
37
38* New Modes and Packages in Emacs 24.2
39
40* Incompatible Lisp Changes in Emacs 24.2
41
42* Lisp changes in Emacs 24.2
17 43
18* Changes in Emacs 24.2 on non-free operating systems 44* Changes in Emacs 24.2 on non-free operating systems
19 45
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 027b6631639..179b7ff3a31 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-04-07 Glenn Morris <rgm@gnu.org>
2
3 * version.el (emacs-bzr-get-version): New function.
4 * loadup.el (emacs-bzr-version): Set it. (Bug#8054)
5 * mail/emacsbug.el (report-emacs-bug): Include bzr version.
6
12012-04-07 Eli Zaretskii <eliz@gnu.org> 72012-04-07 Eli Zaretskii <eliz@gnu.org>
2 8
3 * international/uni-bidi.el: 9 * international/uni-bidi.el:
diff --git a/lisp/loadup.el b/lisp/loadup.el
index b7af41d6246..16cd0171e61 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -259,6 +259,8 @@
259 (versions (mapcar (function (lambda (name) 259 (versions (mapcar (function (lambda (name)
260 (string-to-number (substring name (length base))))) 260 (string-to-number (substring name (length base)))))
261 files))) 261 files)))
262 (setq emacs-bzr-version (condition-case nil (emacs-bzr-get-version)
263 (error nil)))
262 ;; `emacs-version' is a constant, so we shouldn't change it with `setq'. 264 ;; `emacs-version' is a constant, so we shouldn't change it with `setq'.
263 (defconst emacs-version 265 (defconst emacs-version
264 (format "%s.%d" 266 (format "%s.%d"
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 1a02ae7c519..33b73335a7d 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -239,6 +239,8 @@ usually do not have translators for other languages.\n\n")))
239 (add-text-properties (1+ user-point) (point) prompt-properties) 239 (add-text-properties (1+ user-point) (point) prompt-properties)
240 240
241 (insert "\n\nIn " (emacs-version) "\n") 241 (insert "\n\nIn " (emacs-version) "\n")
242 (if (stringp emacs-bzr-version)
243 (insert "Bzr revision: " emacs-bzr-version "\n"))
242 (if (fboundp 'x-server-vendor) 244 (if (fboundp 'x-server-vendor)
243 (condition-case nil 245 (condition-case nil
244 ;; This is used not only for X11 but also W32 and others. 246 ;; This is used not only for X11 but also W32 and others.
diff --git a/lisp/version.el b/lisp/version.el
index bd30f0f81b8..a4bc4fd54a6 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -79,6 +79,26 @@ to the system configuration; look at `system-configuration' instead."
79;; We hope that this alias is easier for people to find. 79;; We hope that this alias is easier for people to find.
80(defalias 'version 'emacs-version) 80(defalias 'version 'emacs-version)
81 81
82;; Set during dumping, this is a defvar so that it can be setq'd.
83(defvar emacs-bzr-version nil "\
84String giving the bzr revision number from which this Emacs was built.
85This is nil if Emacs was not built from a bzr checkout, or if we could
86not determine the revision.")
87
88(defun emacs-bzr-get-version () "\
89Try to return as a string the bzr revision number of the Emacs sources.
90Returns nil if the sources do not seem to be under bzr, or if we could
91not determine the revision. Note that this reports on the current state
92of the sources, which may not correspond to the running Emacs."
93 (let ((file (expand-file-name ".bzr/branch/last-revision" source-directory)))
94 (if (file-readable-p file)
95 (with-temp-buffer
96 (insert-file-contents file)
97 (goto-char (point-max))
98 (if (looking-back "\n")
99 (delete-char -1))
100 (buffer-string)))))
101
82;; We put version info into the executable in the form that `ident' uses. 102;; We put version info into the executable in the form that `ident' uses.
83(or (eq system-type 'windows-nt) 103(or (eq system-type 'windows-nt)
84 (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) 104 (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version))