Add client arg to ‘vc-p4-update-changelog’

This commit is contained in:
Tom Willemse 2021-01-23 10:30:34 -08:00
parent 7726d77a94
commit a9bf4c10ad
2 changed files with 11 additions and 4 deletions

View file

@ -428,7 +428,8 @@ buffer is returned."
(insert (p4-lowlevel-info-lines alist)) (insert (p4-lowlevel-info-lines alist))
buffer)))) buffer))))
(defun p4-lowlevel-changes (file-pattern &optional output-format rev1 rev2 i-flag l-flag m-val s-val) (cl-defun p4-lowlevel-changes
(file-pattern &key output-format rev1 rev2 i-flag l-flag m-val s-val client)
"Call `p4 changes' on FILE-PATTERN. Optional OUTPUT-FORMAT is as "Call `p4 changes' on FILE-PATTERN. Optional OUTPUT-FORMAT is as
described in `p4-lowlevel-command-or-error'. Optionally, limit output described in `p4-lowlevel-command-or-error'. Optionally, limit output
to the revisions between REV1 and REV2. If I-FLAG is non-nil, pass to the revisions between REV1 and REV2. If I-FLAG is non-nil, pass
@ -445,8 +446,10 @@ value with `-m'; if S-VAL is non-nil, pass that value with `-s'."
(m-list (if m-val (list "-m" (if (numberp m-val) (m-list (if m-val (list "-m" (if (numberp m-val)
(number-to-string m-val) (number-to-string m-val)
m-val)))) m-val))))
(s-list (if s-val (list "-s" s-val)))) (s-list (if s-val (list "-s" s-val)))
(client-args (if client (list "-c" client))))
(p4-lowlevel-command-or-error (append (p4-lowlevel-command-or-error (append
client-args
(list "changes") (list "changes")
i-list l-list m-list s-list i-list l-list m-list s-list
(list full-file)) (list full-file))

View file

@ -496,8 +496,12 @@ files under the default directory otherwise."
(setq files "...")) (setq files "..."))
(message "Computing change log entries...") (message "Computing change log entries...")
(insert (p4-lowlevel-info-lines (insert (p4-lowlevel-info-lines
(p4-lowlevel-changes files nil start-rev end-rev (p4-lowlevel-changes files
nil t nil "submitted"))) :rev1 start-rev
:rev2 end-rev
:l-flag t
:s-val "submitted"
:client vc-p4-client)))
(if (= (point) (point-min)) t (if (= (point) (point-min)) t
(if (not (= (point) (point-max))) (if (not (= (point) (point-max)))
(insert "\n")) (insert "\n"))