From 808ecc4e18128c336d4fa9fa54409fdc00616370 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 20 Apr 2010 11:57:54 -0400 Subject: [PATCH] Fix hg envvar handling (Bug#5846). * vc-hg.el (vc-hg-state): Use HGRCPATH, not HGRC. (vc-hg-working-revision): Likewise. Use hg parents, not hg parent (Bug#5846). --- lisp/ChangeLog | 6 ++++++ lisp/vc-hg.el | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0eb059642e..adbe4f08827 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-04-20 Dan Nicolaescu + + * vc-hg.el (vc-hg-state): Use HGRCPATH, not HGRC. + (vc-hg-working-revision): Likewise. Use hg parents, not hg parent + (Bug#5846). + 2010-04-20 Glenn Morris * emacs-lisp/lisp.el (lisp-completion-at-point): Give it a doc string. diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 2438da63670..c1dc6eadd86 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -168,12 +168,13 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (condition-case nil ;; Ignore all errors. (let ((process-environment - ;; Avoid localization of messages so we can parse the output. - (append (list "TERM=dumb" "LANGUAGE=C" "HGRC=") process-environment))) - - (process-file - "hg" nil t nil - "status" "-A" (file-relative-name file))) + ;; Avoid localization of messages so we + ;; can parse the output. + (append (list "TERM=dumb" "LANGUAGE=C" "HGRCPATH=") + process-environment))) + (process-file + "hg" nil t nil + "status" "-A" (file-relative-name file))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) @@ -197,7 +198,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." ((status nil) (default-directory (file-name-directory file)) ;; Avoid localization of messages so we can parse the output. - (avoid-local-env (append (list "TERM=dumb" "LANGUAGE=C" "HGRC=") + (avoid-local-env (append (list "TERM=dumb" "LANGUAGE=C" "HGRCPATH=") process-environment)) (out (with-output-to-string @@ -209,7 +210,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." ;; Ignore all errors. (process-file "hg" nil t nil - "parent" "--template" "{rev}" (file-relative-name file))) + "parents" "--template" "{rev}" (file-relative-name file))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) -- 2.39.5