emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117214: * lisp/vc/vc-hg.el (vc-hg-working-revisi


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117214: * lisp/vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
Date: Fri, 06 Jun 2014 16:30:04 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117214
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17570
author: Santiago PayĆ  i Miralta <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Fri 2014-06-06 12:29:55 -0400
message:
  * lisp/vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
  vc-hg-command.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/vc/vc-hg.el               vchg.el-20091113204419-o5vbwnq5f7feedwu-5062
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-06-06 14:25:39 +0000
+++ b/lisp/ChangeLog    2014-06-06 16:29:55 +0000
@@ -1,3 +1,8 @@
+2014-06-06  Santiago PayĆ  i Miralta  <address@hidden>
+
+       * vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
+       vc-hg-command (bug#17570).
+
 2014-06-06  Stefan Monnier  <address@hidden>
 
        * international/mule-cmds.el (ucs-names): Add special entry for BEL

=== modified file 'lisp/vc/vc-hg.el'
--- a/lisp/vc/vc-hg.el  2014-05-11 02:01:08 +0000
+++ b/lisp/vc/vc-hg.el  2014-06-06 16:29:55 +0000
@@ -227,14 +227,11 @@
 
 (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
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]