diff lisp/vc-hg.el @ 108322:a70c2c59b3f6

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).
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 20 Apr 2010 11:57:54 -0400
parents d7f8e879d70c
children 973b5bc5fcfe 05bd64a0d747
line wrap: on
line diff
--- a/lisp/vc-hg.el	Tue Apr 20 00:54:28 2010 -0700
+++ b/lisp/vc-hg.el	Tue Apr 20 11:57:54 2010 -0400
@@ -168,12 +168,13 @@
                   (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 @@
       ((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 @@
 			;; 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)))))))