From: Dmitry Gutov Date: Thu, 10 Dec 2020 00:31:39 +0000 (+0200) Subject: Valentin Gatien-Baron X-Git-Tag: emacs-28.0.90~4802 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f352ad6f1759ae6dcff6ba43847273491bf9c30;p=emacs.git Valentin Gatien-Baron * lisp/vc/vc-hg.el (vc-hg-working-revision): Use 'hg log -T' instead of 'hg parent' (bug#36534). Copyright-paperwork-exempt: yes --- diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index e7f67e90eef..c8a80d75ec1 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -276,13 +276,12 @@ If `ask', you will be prompted for a branch type." ((eq state ?C) 'up-to-date) ;; Older mercurial versions use this. (t 'up-to-date)))))) -(defun vc-hg-working-revision (file) +(defun vc-hg-working-revision (_file) "Hg-specific version of `vc-working-revision'." - (or (ignore-errors - (with-output-to-string - (vc-hg-command standard-output 0 file - "parent" "--template" "{rev}"))) - "0")) + (ignore-errors + (with-output-to-string + (vc-hg-command standard-output 0 nil + "log" "-r" "." "--template" "{rev}")))) (defcustom vc-hg-symbolic-revision-styles '(builtin-active-bookmark