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'.
This commit is contained in:
Sean Whitton
2026-02-27 13:45:24 +00:00
parent 959da75342
commit 13cc7c2b54
3 changed files with 16 additions and 11 deletions

View File

@@ -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))

View File

@@ -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

View File

@@ -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)