unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33328: 27.0.50; Extend Emacs bug report
@ 2018-11-09 22:19 Michael Albinus
  2018-11-10  7:47 ` Eli Zaretskii
  2018-11-15 17:45 ` Glenn Morris
  0 siblings, 2 replies; 20+ messages in thread
From: Michael Albinus @ 2018-11-09 22:19 UTC (permalink / raw)
  To: 33328

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]


Working on Emacs branches, I'd like to see branch information in the bug
report. It could look like in this report, see the "Repository branch"
line. The respective patch is appended.

Is it OK to push to master?


[-- Attachment #2: Type: text/plain, Size: 3091 bytes --]

diff --git a/lisp/loadup.el b/lisp/loadup.el
index 5ecfae170f..0bb6a81adb 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -368,8 +368,8 @@
 				(string-to-number
 				 (substring name (length base) exelen))))
 			     files)))
-      (setq emacs-repository-version (condition-case nil (emacs-repository-get-version)
-                              (error nil)))
+      (setq emacs-repository-version (emacs-repository-get-version)
+            emacs-repository-branch (emacs-repository-get-branch))
       ;; A constant, so we shouldn't change it with `setq'.
       (defconst emacs-build-number
 	(if versions (1+ (apply 'max versions)) 1))))
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 8cacad8726..e55f950aac 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -307,6 +307,8 @@ report-emacs-bug
 
     (if (stringp emacs-repository-version)
 	(insert "Repository revision: " emacs-repository-version "\n"))
+    (if (stringp emacs-repository-branch)
+	(insert "Repository branch: " emacs-repository-branch "\n"))
     (if (fboundp 'x-server-vendor)
 	(condition-case nil
             ;; This is used not only for X11 but also W32 and others.
diff --git a/lisp/version.el b/lisp/version.el
index 8491930819..4e7f0c1c33 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -133,7 +133,35 @@ emacs-repository-get-version
 
 Optional argument DIR is a directory to use instead of `source-directory'.
 Optional argument EXTERNAL is ignored."
-  (emacs-repository-version-git (or dir source-directory)))
+  (ignore-errors (emacs-repository-version-git (or dir source-directory))))
+
+(defvar emacs-repository-branch nil
+  "String giving the repository branch from which this Emacs was built.
+Value is nil if Emacs was not built from a repository checkout,
+or if we could not determine the branch.")
+
+(defun emacs-repository-branch-git (dir)
+  "Ask git itself for the branch information for directory DIR."
+  (message "Waiting for git...")
+  (with-temp-buffer
+    (let ((default-directory (file-name-as-directory dir)))
+      (and (zerop
+	    (with-demoted-errors "Error running git rev-parse --abbrev-ref: %S"
+	      (call-process "git" nil '(t nil) nil
+                            "rev-parse" "--abbrev-ref" "HEAD")))
+           (goto-char (point-min))
+           (buffer-substring (point) (line-end-position))))))
+
+(defun emacs-repository-get-branch (&optional dir)
+  "Try to return as a string the repository branch of the Emacs sources.
+The format of the returned string is dependent on the VCS in use.
+Value is nil if the sources do not seem to be under version
+control, or if we could not determine the branch.  Note that
+this reports on the current state of the sources, which may not
+correspond to the running Emacs.
+
+Optional argument DIR is a directory to use instead of `source-directory'."
+  (ignore-errors (emacs-repository-branch-git (or dir source-directory))))
 
 ;; We put version info into the executable in the form that `ident' uses.
 (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version))

[-- Attachment #3: Type: text/plain, Size: 6720 bytes --]



In GNU Emacs 27.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
 of 2018-11-09 built on detlef
Repository revision: 4f0e54223a60a34818365475440e023747eab7e9
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12001000
System Description: Ubuntu 18.10

Recent messages:
Opening connection to imap.gmx.net via tls...
Opening connection to imap.gmx.net...done
Opening connection to outlook.office365.com via tls...
Opening connection to outlook.office365.com...done
Reading active file via nnml...
Reading incoming mail from pop...
nnml: Reading incoming mail (no new mail)...done
Reading active file via nnml...done
Reading active file via nndraft...done
Checking new news...done

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8

Major mode: Group

Minor modes in effect:
  gnus-undo-mode: t
  erc-notify-mode: t
  erc-notifications-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  delete-selection-mode: t
  icomplete-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-browse
~/lisp/telepathy hides /home/albinus/.emacs.d/elpa/telepathy-20131209.1258/telepathy
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/src/emacs/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/src/emacs/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/src/emacs/lisp/net/tramp-adb
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/src/emacs/lisp/net/tramp-archive
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/src/emacs/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/src/emacs/lisp/net/tramp-cache
/home/albinus/src/tramp/lisp/trampver hides /usr/local/src/emacs/lisp/net/trampver
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/src/emacs/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/src/emacs/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp hides /usr/local/src/emacs/lisp/net/tramp
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/src/emacs/lisp/net/tramp-loaddefs
~/lisp/dbus hides /usr/local/src/emacs/lisp/net/dbus
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/src/emacs/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/src/emacs/lisp/net/tramp-compat

Features:
(gnus-cite nnir pop3 utf-7 nndraft nnmh nnml gnutls network-stream nsm
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-cache gnus-sum
nnnil smtpmail gnus-demon nntp gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int
gnus-range gnus-win gnus nnheader wid-edit shadow sort mail-extr
warnings emacsbug message rmc puny rfc822 mml mml-sec epa gnus-util
rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils elec-pair erc-notify
erc-networks erc-desktop-notifications erc-match notifications dbus xml
erc-goodies erc erc-backend erc-compat thingatpt pp erc-loaddefs
cperl-mode time tramp-sh kubernetes-tramp lxc-tramp docker-tramp
tramp-cache vagrant-tramp dash term disp-table ehelp tramp trampver
tramp-compat tramp-loaddefs ucs-normalize shell pcomplete comint
ansi-color ring parse-time format-spec advice delsel ido jka-compr
icomplete paren vc vc-dispatcher dired dired-loaddefs mule-util edmacro
kmacro rx slime-autoloads info finder-inf package let-alist derived
pcase cl-extra help-mode easymenu url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map
url-vars seq byte-opt gv bytecomp byte-compile cconv epg epg-config
subr-x cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 438192 18735)
 (symbols 48 37449 10)
 (strings 32 81835 4686)
 (string-bytes 1 2609780)
 (vectors 16 53284)
 (vector-slots 8 941041 34458)
 (floats 8 238 299)
 (intervals 56 390 0)
 (buffers 992 26))

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-11-25 11:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-09 22:19 bug#33328: 27.0.50; Extend Emacs bug report Michael Albinus
2018-11-10  7:47 ` Eli Zaretskii
2018-11-10  8:57   ` Michael Albinus
2018-11-10  9:49     ` Eli Zaretskii
2018-11-10 15:09       ` Michael Albinus
2018-11-15 17:45 ` Glenn Morris
2018-11-15 20:31   ` Michael Albinus
2018-11-20 19:00     ` Glenn Morris
2018-11-21 12:46       ` Michael Albinus
2018-11-22 18:52         ` Glenn Morris
2018-11-22 19:08           ` Eli Zaretskii
2018-11-22 19:14         ` Achim Gratz
2018-11-22 19:22           ` Eli Zaretskii
2018-11-22 19:31             ` Eli Zaretskii
2018-11-22 19:36               ` Achim Gratz
2018-11-22 21:52                 ` Michael Albinus
2018-11-25 11:21                   ` Achim Gratz
2018-11-25 11:46                     ` Michael Albinus
2018-11-23  8:14                 ` Eli Zaretskii
2018-11-22 19:32             ` Achim Gratz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).