summaryrefslogtreecommitdiff
path: root/lisp/vc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc')
-rw-r--r--lisp/vc/vc-bzr.el1
-rw-r--r--lisp/vc/vc-cvs.el2
-rw-r--r--lisp/vc/vc-git.el2
-rw-r--r--lisp/vc/vc-hg.el21
-rw-r--r--lisp/vc/vc-mtn.el4
-rw-r--r--lisp/vc/vc-svn.el4
6 files changed, 30 insertions, 4 deletions
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 40f251654f2..9b2711d8146 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -331,6 +331,7 @@ in the repository root directory of FILE."
"Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.")
;; To be called via vc-pull from vc.el, which requires vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
(declare-function vc-compilation-mode "vc-dispatcher" (backend))
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index c0a199dc078..5f5807fb3c6 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -543,6 +543,8 @@ Will fail unless you have administrative privileges on the repo."
;;;
(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
+;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
(defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 0e33896a715..27898a991a0 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -461,6 +461,8 @@ or an empty string if none."
;; Follows vc-git-command (or vc-do-async-command), which uses vc-do-command
;; from vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
+;; Follows vc-exec-after.
(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
(defun vc-git-dir-status-goto-stage (stage files update-function)
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index c4d6092d100..f9957c1afff 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -259,6 +259,14 @@ highlighting the Log View buffer."
(defvar vc-hg-log-graph nil
"If non-nil, use `--graph' in the short log output.")
+(defvar vc-hg-log-format (concat "changeset: {rev}:{node|short}\n"
+ "{tags % 'tag: {tag}\n'}"
+ "{if(parents, 'parents: {parents}\n')}"
+ "user: {author}\n"
+ "Date: {date|date}\n"
+ "summary: {desc|tabindent}\n\n")
+ "Mercurial log template for `vc-hg-print-log' long format.")
+
(defun vc-hg-print-log (files buffer &optional shortlog start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'.
@@ -276,9 +284,11 @@ If LIMIT is non-nil, show no more than this many entries."
(nconc
(when start-revision (list (format "-r%s:0" start-revision)))
(when limit (list "-l" (format "%s" limit)))
- (when shortlog `(,@(if vc-hg-log-graph '("--graph"))
- "--template"
- ,(car vc-hg-root-log-format)))
+ (if shortlog
+ `(,@(if vc-hg-log-graph '("--graph"))
+ "--template"
+ ,(car vc-hg-root-log-format))
+ `("--template" ,vc-hg-log-format))
vc-hg-log-switches)))))
(defvar log-view-message-re)
@@ -295,6 +305,7 @@ If LIMIT is non-nil, show no more than this many entries."
(if (eq vc-log-view-type 'short)
(cadr vc-hg-root-log-format)
"^changeset:[ \t]*\\([0-9]+\\):\\(.+\\)"))
+ (set (make-local-variable 'tab-width) 2)
;; Allow expanding short log entries
(when (eq vc-log-view-type 'short)
(setq truncate-lines t)
@@ -345,7 +356,7 @@ If LIMIT is non-nil, show no more than this many entries."
(defun vc-hg-expanded-log-entry (revision)
(with-temp-buffer
- (vc-hg-command t nil nil "log" "-r" revision)
+ (vc-hg-command t nil nil "log" "-r" revision "--template" vc-hg-log-format)
(goto-char (point-min))
(unless (eobp)
;; Indent the expanded log entry.
@@ -620,6 +631,8 @@ REV is the revision to check out into WORKFILE."
;; Follows vc-hg-command (or vc-do-async-command), which uses vc-do-command
;; from vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
+;; Follows vc-exec-after.
(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
(defun vc-hg-dir-status-files (dir files update-function)
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index 3197d606061..b56a08f2a9e 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -138,6 +138,10 @@ switches."
((match-end 2) (push (list (match-string 3) 'added) result))))
(funcall update-function result)))
+;; dir-status-files called from vc-dir, which loads vc,
+;; which loads vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
+
(defun vc-mtn-dir-status-files (dir _files update-function)
(vc-mtn-command (current-buffer) 'async dir "status")
(vc-run-delayed
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 2ec65a1ad07..4ef63a23db5 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -208,6 +208,10 @@ switches."
(setq result (cons (list filename state) result)))))
(funcall callback result)))
+;; dir-status-files called from vc-dir, which loads vc,
+;; which loads vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
+
(autoload 'vc-expand-dirs "vc")
(defun vc-svn-dir-status-files (_dir files callback)