# HG changeset patch # User Stefan Monnier # Date 1290004468 18000 # Node ID 753ce65aa0fcbfd6c43df5c9e78c52c7b9f11178 # Parent d7f360c219d05a8e2d7a61307eac4d019e97fc46 * vc-hg.el (vc-hg-program): New var. Suggested by Norman Gray . (vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it. diff -r d7f360c219d0 -r 753ce65aa0fc lisp/ChangeLog --- a/lisp/ChangeLog Tue Nov 16 19:47:16 2010 -0800 +++ b/lisp/ChangeLog Wed Nov 17 09:34:28 2010 -0500 @@ -1,3 +1,9 @@ +2010-11-17 Stefan Monnier + + * vc-hg.el (vc-hg-program): New var. + Suggested by Norman Gray . + (vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it. + 2010-11-17 Glenn Morris * emacs-lisp/autoload.el (autoload-find-destination): The function diff -r d7f360c219d0 -r 753ce65aa0fc lisp/vc-hg.el --- a/lisp/vc-hg.el Tue Nov 16 19:47:16 2010 -0800 +++ b/lisp/vc-hg.el Wed Nov 17 09:34:28 2010 -0500 @@ -133,6 +133,10 @@ :version "23.1" :group 'vc) +(defcustom vc-hg-program "hg" + "Name of the Mercurial executable (excluding any arguments)." + :type 'string + :group 'vc) ;;; Properties of the backend @@ -173,7 +177,7 @@ (append (list "TERM=dumb" "LANGUAGE=C") process-environment))) (process-file - "hg" nil t nil + vc-hg-program nil t nil "--config" "alias.status=status" "--config" "defaults.status=" "status" "-A" (file-relative-name file))) @@ -211,7 +215,7 @@ (let ((process-environment avoid-local-env)) ;; Ignore all errors. (process-file - "hg" nil t nil + vc-hg-program nil t nil "--config" "alias.parents=parents" "--config" "defaults.parents=" "parents" "--template" "{rev}" (file-relative-name file))) @@ -226,7 +230,7 @@ (condition-case nil (let ((process-environment avoid-local-env)) (process-file - "hg" nil nil nil + vc-hg-program nil nil nil ;; We use "log" here, if there's a faster command ;; that returns true for an 'added file and false ;; for an 'unregistered one, we could use that. @@ -619,7 +623,7 @@ "A wrapper around `vc-do-command' for use in vc-hg.el. The difference to vc-do-command is that this function always invokes `hg', and that it passes `vc-hg-global-switches' to it before FLAGS." - (apply 'vc-do-command (or buffer "*vc*") okstatus "hg" file-or-list + (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-or-list (if (stringp vc-hg-global-switches) (cons vc-hg-global-switches flags) (append vc-hg-global-switches