]> code.delx.au - gnu-emacs/commitdiff
* vc-hg.el (vc-hg-program): New var.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Nov 2010 14:34:28 +0000 (09:34 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Nov 2010 14:34:28 +0000 (09:34 -0500)
Suggested by Norman Gray <norman@astro.gla.ac.uk>.
(vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it.

lisp/ChangeLog
lisp/vc-hg.el

index d0607f72f7e339e448bef68660e2153f4f979353..c1e446c313822f8bb8f193aec1cf970f42ac12b6 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * vc-hg.el (vc-hg-program): New var.
+       Suggested by Norman Gray <norman@astro.gla.ac.uk>.
+       (vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it.
+
 2010-11-17  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/autoload.el (autoload-find-destination): The function
index 2339f887a34dbba40249795e381502410a29de14..52b748704270e8c64d28c1e48a318578a4b52314 100644 (file)
@@ -133,6 +133,10 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
   :version "23.1"
   :group 'vc)
 
+(defcustom vc-hg-program "hg"
+  "Name of the Mercurial executable (excluding any arguments)."
+  :type 'string
+  :group 'vc)
 \f
 ;;; Properties of the backend
 
@@ -173,7 +177,7 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
                             (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 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
                      (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 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
            (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 @@ REV is the revision to check out into WORKFILE."
   "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