aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-11-17 09:34:28 -0500
committerStefan Monnier2010-11-17 09:34:28 -0500
commit88bf1becf870b9467e3609ee203dadbdb3583e34 (patch)
treea02f3c7fa6586dd5de2e5b95343e1b58ec32887f
parent4c0eb0d3db97c4f13612a6952bf1e7a88d63cb86 (diff)
downloademacs-88bf1becf870b9467e3609ee203dadbdb3583e34.tar.gz
emacs-88bf1becf870b9467e3609ee203dadbdb3583e34.zip
* 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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc-hg.el12
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d0607f72f7e..c1e446c3138 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-11-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * vc-hg.el (vc-hg-program): New var.
4 Suggested by Norman Gray <norman@astro.gla.ac.uk>.
5 (vc-hg-state, vc-hg-working-revision, vc-hg-command): Use it.
6
12010-11-17 Glenn Morris <rgm@gnu.org> 72010-11-17 Glenn Morris <rgm@gnu.org>
2 8
3 * emacs-lisp/autoload.el (autoload-find-destination): The function 9 * emacs-lisp/autoload.el (autoload-find-destination): The function
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el
index 2339f887a34..52b74870427 100644
--- a/lisp/vc-hg.el
+++ b/lisp/vc-hg.el
@@ -133,6 +133,10 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
133 :version "23.1" 133 :version "23.1"
134 :group 'vc) 134 :group 'vc)
135 135
136(defcustom vc-hg-program "hg"
137 "Name of the Mercurial executable (excluding any arguments)."
138 :type 'string
139 :group 'vc)
136 140
137;;; Properties of the backend 141;;; Properties of the backend
138 142
@@ -173,7 +177,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
173 (append (list "TERM=dumb" "LANGUAGE=C") 177 (append (list "TERM=dumb" "LANGUAGE=C")
174 process-environment))) 178 process-environment)))
175 (process-file 179 (process-file
176 "hg" nil t nil 180 vc-hg-program nil t nil
177 "--config" "alias.status=status" 181 "--config" "alias.status=status"
178 "--config" "defaults.status=" 182 "--config" "defaults.status="
179 "status" "-A" (file-relative-name file))) 183 "status" "-A" (file-relative-name file)))
@@ -211,7 +215,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
211 (let ((process-environment avoid-local-env)) 215 (let ((process-environment avoid-local-env))
212 ;; Ignore all errors. 216 ;; Ignore all errors.
213 (process-file 217 (process-file
214 "hg" nil t nil 218 vc-hg-program nil t nil
215 "--config" "alias.parents=parents" 219 "--config" "alias.parents=parents"
216 "--config" "defaults.parents=" 220 "--config" "defaults.parents="
217 "parents" "--template" "{rev}" (file-relative-name file))) 221 "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."
226 (condition-case nil 230 (condition-case nil
227 (let ((process-environment avoid-local-env)) 231 (let ((process-environment avoid-local-env))
228 (process-file 232 (process-file
229 "hg" nil nil nil 233 vc-hg-program nil nil nil
230 ;; We use "log" here, if there's a faster command 234 ;; We use "log" here, if there's a faster command
231 ;; that returns true for an 'added file and false 235 ;; that returns true for an 'added file and false
232 ;; for an 'unregistered one, we could use that. 236 ;; for an 'unregistered one, we could use that.
@@ -619,7 +623,7 @@ REV is the revision to check out into WORKFILE."
619 "A wrapper around `vc-do-command' for use in vc-hg.el. 623 "A wrapper around `vc-do-command' for use in vc-hg.el.
620The difference to vc-do-command is that this function always invokes `hg', 624The difference to vc-do-command is that this function always invokes `hg',
621and that it passes `vc-hg-global-switches' to it before FLAGS." 625and that it passes `vc-hg-global-switches' to it before FLAGS."
622 (apply 'vc-do-command (or buffer "*vc*") okstatus "hg" file-or-list 626 (apply 'vc-do-command (or buffer "*vc*") okstatus vc-hg-program file-or-list
623 (if (stringp vc-hg-global-switches) 627 (if (stringp vc-hg-global-switches)
624 (cons vc-hg-global-switches flags) 628 (cons vc-hg-global-switches flags)
625 (append vc-hg-global-switches 629 (append vc-hg-global-switches