From 4f352ad6f1759ae6dcff6ba43847273491bf9c30 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 10 Dec 2020 02:31:39 +0200 Subject: [PATCH] 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 --- lisp/vc/vc-hg.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 -- 2.39.2