summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-hg.el
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2015-02-26 15:46:12 +0100
committerOscar Fuentes <ofv@wanadoo.es>2015-02-26 15:50:41 +0100
commitb5a0603eb41c7a350c16a1b3ec5c1b8d8c84a4eb (patch)
tree017b5464b8619fb7d79079be798ce0ed82b3e48b /lisp/vc/vc-hg.el
parentd8e9122115b5ffcec342c841b81cb2d2b8217e4b (diff)
downloademacs-b5a0603eb41c7a350c16a1b3ec5c1b8d8c84a4eb.tar.gz
Use vc-switches on vc-*-annotate-command
This also removes switch "-C -C" from vc-git-annotate-command. Fixes: debbugs:17945 * vc/vc.el (vc-annotate-switches): New defcustom. * vc/vc-bzr.el (vc-bzr-annotate-switches): New defcustom. (vc-bzr-annotate-command): Use it. * vc/vc-cvs.el (vc-cvs-annotate-switches): New defcustom. (vc-cvs-annotate-command): Use it. * vc/vc-git.el (vc-git-annotate-switches): New defcustom. (vc-git-annotate-command): Use it. * vc/vc-hg.el (vc-hg-annotate-switches): New defcustom. (vc-hg-annotate-command): Use it. * vc/vc-mtn.el (vc-mtn-annotate-switches): New defcustom. (vc-mtn-annotate-command): Use it. * vc/vc-svn.el (vc-svn-annotate-switches): New defcustom. (vc-svn-annotate-command): Use it.
Diffstat (limited to 'lisp/vc/vc-hg.el')
-rw-r--r--lisp/vc/vc-hg.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 8b4067f536b..c841dfcdf54 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -131,6 +131,17 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
:version "23.1"
:group 'vc-hg)
+(defcustom vc-hg-annotate-switches nil
+ "String or list of strings specifying switches for hg annotate under VC.
+If nil, use the value of `vc-annotate-switches'. If t, use no
+switches."
+ :type '(choice (const :tag "Unspecified" nil)
+ (const :tag "None" t)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List" :value ("") string))
+ :version "25.1"
+ :group 'vc-hg)
+
(defcustom vc-hg-program "hg"
"Name of the Mercurial executable (excluding any arguments)."
:type 'string
@@ -358,8 +369,9 @@ If LIMIT is non-nil, show no more than this many entries."
(defun vc-hg-annotate-command (file buffer &optional revision)
"Execute \"hg annotate\" on FILE, inserting the contents in BUFFER.
Optional arg REVISION is a revision to annotate from."
- (vc-hg-command buffer 0 file "annotate" "-d" "-n" "--follow"
- (when revision (concat "-r" revision))))
+ (apply #'vc-hg-command buffer 0 file "annotate" "-d" "-n" "--follow"
+ (append (vc-switches 'hg 'annotate)
+ (if revision (list (concat "-r" revision))))))
(declare-function vc-annotate-convert-time "vc-annotate" (time))