From: Dan Nicolaescu Date: Mon, 14 Dec 2009 17:12:18 +0000 (+0000) Subject: (vc-hg-working-revision): Make sure the command is executed in a X-Git-Tag: emacs-pretest-23.1.91~88 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=110de3bb16877fc9ffcf2e89a7d7438315197ac2;p=emacs.git (vc-hg-working-revision): Make sure the command is executed in a known environment so that we can parse the output. (Bug#4417) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 149cb6c7b22..a1d81fb1873 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 5a90b66e8b5..91e9d682f88 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -202,10 +202,14 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." 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)))))))