From 0f054faa4d3fc30ec2c1cc1f2e800f113d054a8d Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 10 Mar 2021 18:10:16 -0800 Subject: [PATCH] =?UTF-8?q?Use=20the=20right=20client=20for=20=E2=80=98vc-?= =?UTF-8?q?dir=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vc-p4.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vc-p4.el b/vc-p4.el index 6c22f99..9641c98 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -189,10 +189,12 @@ compare non-open files to the depot version." _FILES is ignored. The UPDATE-FUNCTION is used to process the results of this function." ;; XXX: this should be asynchronous. - (let ((lists (p4-lowlevel-fstat - (format "%s/..." (directory-file-name (expand-file-name dir))) - :noerror t - :client vc-p4-client))) + (let* ((vc-p4-client (with-current-buffer (find-file-noselect dir) + vc-p4-client)) + (lists (p4-lowlevel-fstat + (format "%s/..." (directory-file-name (expand-file-name dir))) + :noerror t + :client vc-p4-client))) (when (stringp (caar lists)) (setq lists (list lists))) (dolist (this-list lists)