]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-hg-working-revision): Make sure the command is executed in a
authorDan Nicolaescu <dann@ics.uci.edu>
Mon, 14 Dec 2009 17:12:18 +0000 (17:12 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Mon, 14 Dec 2009 17:12:18 +0000 (17:12 +0000)
known environment so that we can parse the output.  (Bug#4417)

lisp/ChangeLog
lisp/vc-hg.el

index 149cb6c7b22cce9f2d0f703fe2e1438530ecd2ee..a1d81fb1873e7399bc1db66d4fcdc61ce11cefbc 100644 (file)
@@ -1,6 +1,8 @@
 2009-12-14  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * 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  <cyd@stupidchicken.com>
 
index 5a90b66e8b58ada1c0ba04db36ca48b7fc37b9bf..91e9d682f8842db0ed7da824b987cc7d29cc4197 100644 (file)
@@ -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)))))))