Function: emacs-repository-get-version

emacs-repository-get-version is a byte-compiled function defined in version.el.gz.

Signature

(emacs-repository-get-version &optional DIR EXTERNAL)

Documentation

Try to return as a string the repository revision of the Emacs sources.

The format of the returned string is dependent on the VCS in use.

If Emacs is built for Android, use the version information embedded in the Emacs installation package.

Value is nil if the sources do not seem to be under version control, or if we could not determine the revision. 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. Optional argument EXTERNAL is ignored.

Aliases

emacs-bzr-get-version (obsolete since 24.4)

Source Code

;; Defined in /usr/src/emacs/lisp/version.el.gz
(defun emacs-repository-get-version (&optional dir _external)
  "Try to return as a string the repository revision of the Emacs sources.
The format of the returned string is dependent on the VCS in use.

If Emacs is built for Android, use the version information
embedded in the Emacs installation package.

Value is nil if the sources do not seem to be under version
control, or if we could not determine the revision.  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'.
Optional argument EXTERNAL is ignored."
  (cond ((and (featurep 'android)
              (eq system-type 'android))
         (emacs-repository-version-android))
        (t (emacs-repository-version-git
            (or dir source-directory)))))