]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-hg-program): New option.
authorGlenn Morris <rgm@gnu.org>
Sat, 22 Nov 2008 03:29:03 +0000 (03:29 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 22 Nov 2008 03:29:03 +0000 (03:29 +0000)
(vc-hg-state, vc-hg-working-revision, vc-hg-command):
Use vc-hg-program rather than hard-coded "hg".

lisp/vc-hg.el

index aa11495441afa9b6707296ee7ed15899046f486d..35ff589f9f0468a31024c2391468b8cf4cd2ac7f 100644 (file)
 
 ;;; Customization options
 
+(defcustom vc-hg-program "hg"
+  "Name of the Hg executable."
+  :type 'string
+  :version "23.1"
+  :group 'vc)
+
 (defcustom vc-hg-global-switches nil
   "*Global switches to pass to any Hg command."
   :type '(choice (const :tag "None" nil)
@@ -174,7 +180,8 @@ If you want to force an empty list of arguments, use t."
                  (condition-case nil
                      ;; Ignore all errors.
                      (call-process
-                      "hg" nil t nil "--cwd" (file-name-directory file)
+                      vc-hg-program nil t nil
+                       "--cwd" (file-name-directory file)
                       "status" "-A" (file-name-nondirectory file))
                    ;; Some problem happened.  E.g. We can't find an `hg'
                    ;; executable.
@@ -205,7 +212,8 @@ If you want to force an empty list of arguments, use t."
                  (condition-case nil
                      ;; Ignore all errors.
                      (call-process
-                      "hg" nil t nil "--cwd" (file-name-directory file)
+                      vc-hg-program nil t nil
+                       "--cwd" (file-name-directory file)
                       "log" "-l1" (file-name-nondirectory file))
                    ;; Some problem happened.  E.g. We can't find an `hg'
                    ;; executable.
@@ -597,9 +605,9 @@ REV is the revision to check out into WORKFILE."
 
 (defun vc-hg-command (buffer okstatus file-or-list &rest flags)
   "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
+The difference to vc-do-command is that this function always invokes
+`vc-hg-program', and that it passes `vc-hg-global-switches' to it before FLAGS."
+  (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