Fix using client for registering new files
This commit is contained in:
parent
b95132e71e
commit
553914a5ac
2 changed files with 5 additions and 3 deletions
|
@ -603,9 +603,11 @@ files, then returns a list of lists of field-name/value elements."
|
|||
(car lists)
|
||||
lists)))
|
||||
|
||||
(defun p4-lowlevel-info ()
|
||||
(cl-defun p4-lowlevel-info (&key client)
|
||||
"Return an alist representing the output of `p4 info'."
|
||||
(let* ((base-alist (p4-lowlevel-command-or-error "info" nil nil t))
|
||||
(let* ((client-args (if client (list "-c" client)))
|
||||
(args (append client-args (list "info")))
|
||||
(base-alist (p4-lowlevel-command-or-error args nil nil t))
|
||||
(info-elements (p4-lowlevel-re-assoc "^info" base-alist))
|
||||
line tag value info-alist element)
|
||||
(while info-elements
|
||||
|
|
2
vc-p4.el
2
vc-p4.el
|
@ -913,7 +913,7 @@ If DIRNAME is not specified, uses `default-directory'."
|
|||
(defun vc-p4-is-in-client (file)
|
||||
"Return true if FILE is inside the p4 client hierarchy."
|
||||
(let* ((default-directory (file-name-directory file))
|
||||
(info (p4-lowlevel-info))
|
||||
(info (p4-lowlevel-info :client vc-p4-client))
|
||||
(root (alist-get "Client root" info nil nil #'string=))
|
||||
(cwd (alist-get "Current directory" info nil nil #'string=)))
|
||||
(string-prefix-p root cwd)))
|
||||
|
|
Loading…
Reference in a new issue