From 13cc7c2b5406e9a2f4a6fbb89730020228e9f7f1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 27 Feb 2026 13:45:24 +0000 Subject: [PATCH] New 'log-outstanding' value for vc-log-view-type This fixes vc-hg-print-log's choice of -r arguments to 'hg log'. * lisp/vc/vc.el (vc-log-view-type): New 'log-outstanding' value. (vc-log-outstanding): Pass it. * lisp/vc/vc-git.el (vc-git-log-view-mode): * lisp/vc/vc-hg.el (vc-hg-print-log, vc-hg-log-view-mode): Treat 'log-outstanding' the same as 'log-outgoing'. --- lisp/vc/vc-git.el | 3 ++- lisp/vc/vc-hg.el | 6 ++++-- lisp/vc/vc.el | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 43383ebfe40..b238afcd127 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1979,7 +1979,8 @@ log entries." (cadr vc-git-root-log-format) "^commit +\\([0-9a-z]+\\)")) ;; Allow expanding short log entries. - (when (memq vc-log-view-type '(short log-outgoing log-incoming mergebase)) + (when (memq vc-log-view-type + '(short log-outgoing log-incoming log-outstanding mergebase)) (setq truncate-lines t) (setq-local log-view-expanded-log-entry-function 'vc-git-expanded-log-entry)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 63c56d55278..d671caa23db 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -444,7 +444,8 @@ the log starting from that revision." ;; commits from all branches are included in the log. (cond ((not (stringp limit)) (format "-r%s:0" start)) - ((eq vc-log-view-type 'log-outgoing) + ((memq vc-log-view-type '(log-outgoing + log-outstanding)) (format "-rreverse(only(%s, %s))" start limit)) (t (format "-r%s:%s & !%s" start limit limit))) @@ -468,7 +469,8 @@ the log starting from that revision." (define-derived-mode vc-hg-log-view-mode log-view-mode "Hg-Log-View" (require 'add-log) ;; we need the add-log faces - (let ((shortp (memq vc-log-view-type '(short log-incoming log-outgoing)))) + (let ((shortp (memq vc-log-view-type + '(short log-incoming log-outgoing log-outstanding)))) (setq-local log-view-file-re regexp-unmatchable) (setq-local log-view-per-file-logs nil) (setq-local log-view-message-re diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 9654f2bb699..3ed17942231 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -3463,7 +3463,8 @@ When called from Lisp, optional argument FILESET overrides the fileset." (backend (car fileset))) (vc-print-log-internal backend (cadr fileset) nil nil (vc--outgoing-base-mergebase backend - upstream-location)))) + upstream-location) + 'log-outstanding))) ;;;###autoload (defun vc-root-log-outstanding (&optional upstream-location) @@ -4182,13 +4183,14 @@ LIMIT can also be a string, which means the revision before which to stop." "Set this to record the type of VC log shown in the current buffer. Supported values are: - `short' -- short log form, one line for each commit - `long' -- long log form, including full log message and author - `with-diff' -- log including diffs - `log-outgoing' -- log of changes to be pushed to upstream - `log-incoming' -- log of changes to be brought by pulling from upstream - `log-search' -- log entries matching a pattern; shown in long format - `mergebase' -- log created by `vc-log-mergebase'.") + `short' -- short log form, one line for each commit + `long' -- long log form, including full log message and author + `with-diff' -- log including diffs + `log-outgoing' -- log of changes to be pushed to upstream + `log-incoming' -- log of changes to be brought by pulling from upstream + `log-outstanding' -- log of changes you've not yet finished sharing + `log-search' -- log entries matching a pattern; shown in long format + `mergebase' -- log created by `vc-log-mergebase'.") (put 'vc-log-view-type 'permanent-local t) (defvar vc-sentinel-movepoint)