diff --git a/etc/NEWS b/etc/NEWS index dc21ac8399b..b3a497c351a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3088,6 +3088,11 @@ You can use 'C-u C-x v +' to preview or change the arguments. *** 'C-u C-x v +' and 'C-u C-x v P' for Git have an input history. This was already in place for Mercurial. +--- +*** 'vc-hg-working-revision' now returns changeset hashes. +Previously it returned local revision numbers, but hashes are more +robust for how this function is typically used. + ** Package +++ diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index d671caa23db..398645e5a1e 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -282,7 +282,8 @@ A value of `default' means to use the value of `vc-resolve-conflicts'." (ignore-errors (with-output-to-string (vc-hg-command standard-output 0 nil - "log" "-r" "." "--template" "{rev}")))) + "log" "-r" "." "--template" + (if vc-use-short-revision "{node|short}" "{node}"))))) (defcustom vc-hg-symbolic-revision-styles '(builtin-active-bookmark