vc-hg--checkin: When committing a patch, advance active hg bookmark

* lisp/vc/vc-hg.el (vc-hg--checkin): When committing a patch,
advance any active hg bookmark (bug#80848).

Copyright-paperwork-exempt: yes
This commit is contained in:
Aaron L. Zeng 2026-04-17 12:06:38 -04:00 committed by Sean Whitton
parent 00b767089e
commit c92354d190

View file

@ -1305,8 +1305,11 @@ It is an error to supply both or neither."
;; need to make both of them part of the async command,
;; possibly by writing out a tiny shell script (bug#79235).
(when patch-file
(vc-hg-command nil 0 nil "update" "--merge"
"--tool" "internal:local" "tip")))))
(let ((bmark (alist-get 'bookmark (vc-hg--working-branch))))
(when bmark
(vc-hg-command nil 0 nil "bookmark" "-f" "-r" "tip" bmark))
(vc-hg-command nil 0 nil "update" "--merge"
"--tool" "internal:local" (or bmark "tip")))))))
(if vc-async-checkin
(let* ((buffer (vc-hg--async-buffer))
(proc (apply #'vc-hg--async-command buffer