]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
authorSantiago Payà i Miralta <santiagopim@gmail.com>
Fri, 6 Jun 2014 16:29:55 +0000 (12:29 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 6 Jun 2014 16:29:55 +0000 (12:29 -0400)
vc-hg-command.

Fixes: debbugs:17570
lisp/ChangeLog
lisp/vc/vc-hg.el

index 77b1585dcbef900a3bf6993c8131f5ef16b268ea..a3f061a7d934a7e0c7f506c6bcb334fe189da2aa 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-06  Santiago Payà i Miralta  <santiagopim@gmail.com>
+
+       * vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
+       vc-hg-command (bug#17570).
+
 2014-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * international/mule-cmds.el (ucs-names): Add special entry for BEL
index 05b53a3eeb6add2fb2f083ed067f30832a66d0d1..b800c64c8697a92a42f12dc765b9fbb53a5bb6c3 100644 (file)
@@ -227,14 +227,11 @@ highlighting the Log View buffer."
 
 (defun vc-hg-working-revision (file)
   "Hg-specific version of `vc-working-revision'."
-  (let ((default-directory (if (file-directory-p file)
-                               (file-name-as-directory file)
-                             (file-name-directory file))))
-    (ignore-errors
-      (with-output-to-string
-        (process-file vc-hg-program nil standard-output nil
-                      "log" "-l" "1" "--template" "{rev}"
-                      (file-relative-name file))))))
+  (or (ignore-errors
+        (with-output-to-string
+          (vc-hg-command standard-output 0 file
+                         "parent" "--template" "{rev}")))
+      "0"))
 
 ;;; History functions