emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp vc-hg.el


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp vc-hg.el
Date: Sat, 22 Nov 2008 03:29:03 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/11/22 03:29:03

Modified files:
        lisp           : vc-hg.el 

Log message:
        (vc-hg-program): New option.
        (vc-hg-state, vc-hg-working-revision, vc-hg-command):
        Use vc-hg-program rather than hard-coded "hg".

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/vc-hg.el?cvsroot=emacs&r1=1.88&r2=1.89

Patches:
Index: vc-hg.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-hg.el,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- vc-hg.el    20 Nov 2008 02:43:45 -0000      1.88
+++ vc-hg.el    22 Nov 2008 03:29:03 -0000      1.89
@@ -116,6 +116,12 @@
 
 ;;; 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 @@
                  (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 @@
                  (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 @@
 
 (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]