Add ‘vc-p4-dir-extra-headers’
This function shows extra information in the header of VC dir buffers.
This commit is contained in:
parent
45a6cf8173
commit
f3423ce275
2 changed files with 27 additions and 0 deletions
|
@ -28,6 +28,10 @@ This interactive command lets you log in to Perforce when your session has expir
|
||||||
|
|
||||||
VC expects the status to be reported as ~needs-update~, not ~needs-patch~.
|
VC expects the status to be reported as ~needs-update~, not ~needs-patch~.
|
||||||
|
|
||||||
|
** ADDED Extra headers in ~vc-dir~
|
||||||
|
|
||||||
|
Specifically the Server, root directory, client, and stream are shown in the headers.
|
||||||
|
|
||||||
* 0.2.1 -- 2020-05-27
|
* 0.2.1 -- 2020-05-27
|
||||||
** FIXED Recognition of sub-directories of Perforce repos
|
** FIXED Recognition of sub-directories of Perforce repos
|
||||||
|
|
||||||
|
|
23
vc-p4.el
23
vc-p4.el
|
@ -1034,4 +1034,27 @@ The difference to vc-do-command is that this function always invokes `p4'."
|
||||||
"Check if there is an active session for Perforce."
|
"Check if there is an active session for Perforce."
|
||||||
(p4-lowlevel-login :status t))
|
(p4-lowlevel-login :status t))
|
||||||
|
|
||||||
|
(defun vc-p4-dir-extra-headers (dir)
|
||||||
|
(let ((extra-info (p4-lowlevel-info :client vc-p4-client)))
|
||||||
|
(concat
|
||||||
|
(propertize "Client :" 'face 'font-lock-type-face)
|
||||||
|
" "
|
||||||
|
(propertize (alist-get "Client name" extra-info nil nil #'string=)
|
||||||
|
'face 'font-lock-variable-name-face)
|
||||||
|
"\n"
|
||||||
|
(propertize "Stream :" 'face 'font-lock-type-face)
|
||||||
|
" "
|
||||||
|
(propertize (alist-get "Client stream" extra-info nil nil #'string=)
|
||||||
|
'face 'font-lock-variable-name-face)
|
||||||
|
"\n"
|
||||||
|
(propertize "Root :" 'face 'font-lock-type-face)
|
||||||
|
" "
|
||||||
|
(propertize (alist-get "Client root" extra-info nil nil #'string=)
|
||||||
|
'face 'font-lock-variable-name-face)
|
||||||
|
"\n"
|
||||||
|
(propertize "Server :" 'face 'font-lock-type-face)
|
||||||
|
" "
|
||||||
|
(propertize (alist-get "Server address" extra-info nil nil #'string=)
|
||||||
|
'face 'font-lock-variable-name-face))))
|
||||||
|
|
||||||
(provide 'vc-p4)
|
(provide 'vc-p4)
|
||||||
|
|
Loading…
Reference in a new issue