From c92354d19023537fe77b7b16773e613e3d4d31c4 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Fri, 17 Apr 2026 12:06:38 -0400 Subject: [PATCH] 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 --- lisp/vc/vc-hg.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 1535e767ea5..08a58425104 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -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