# HG changeset patch # User Dan Nicolaescu # Date 1260810738 0 # Node ID ad87b48da2b0a4fff5c420919cc9010ec1e266d8 # Parent 87010af04b9a055c945c98737f2f6db6f9226f5f (vc-hg-working-revision): Make sure the command is executed in a known environment so that we can parse the output. (Bug#4417) diff -r 87010af04b9a -r ad87b48da2b0 lisp/ChangeLog --- a/lisp/ChangeLog Mon Dec 14 16:55:34 2009 +0000 +++ b/lisp/ChangeLog Mon Dec 14 17:12:18 2009 +0000 @@ -1,6 +1,8 @@ 2009-12-14 Dan Nicolaescu * vc-hg.el (vc-hg-print-log): Fix argument order. + (vc-hg-working-revision): Make sure the command is executed in a + known environment so that we can parse the output. (Bug#4417) 2009-12-14 Chong Yidong diff -r 87010af04b9a -r ad87b48da2b0 lisp/vc-hg.el --- a/lisp/vc-hg.el Mon Dec 14 16:55:34 2009 +0000 +++ b/lisp/vc-hg.el Mon Dec 14 17:12:18 2009 +0000 @@ -202,10 +202,14 @@ standard-output (setq status (condition-case nil - ;; Ignore all errors. - (process-file - "hg" nil t nil - "log" "-l1" (file-relative-name file)) + (let ((process-environment + ;; Avoid localization of messages so we can parse the output. + (append (list "TERM=dumb" "LANGUAGE=C" "HGRC=") + process-environment))) + ;; Ignore all errors. + (process-file + "hg" nil t nil + "log" "-l1" (file-relative-name file))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil)))))))