diff options
author | Santiago PayĆ i Miralta <santiagopim@gmail.com> | 2014-06-06 12:29:55 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-06-06 12:29:55 -0400 |
commit | f4be80b783f23a54b18dfe43ca649a2f4f31b2a5 (patch) | |
tree | b4fd363fa178addd598e4b09caa6241b4d5f414e /lisp | |
parent | 28b83297264341b404856fd6e96dd366fa0c1fd0 (diff) |
* lisp/vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
vc-hg-command.
Fixes: debbugs:17570
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/vc/vc-hg.el | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 77b1585dcbe..a3f061a7d93 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 05b53a3eeb6..b800c64c869 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -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 |