]> git.eshelyaron.com Git - emacs.git/commitdiff
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 10 Dec 2020 00:31:39 +0000 (02:31 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 10 Dec 2020 00:31:55 +0000 (02:31 +0200)
* 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

index e7f67e90eeff8616ed894eec8f5a5ee56ce649f0..c8a80d75ec1b06a3e45ce19c88396ad3d174c950 100644 (file)
@@ -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