diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2020-02-11 23:45:52 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2020-02-12 00:29:39 +0200 |
commit | 3a5129a1c963d66a1b2e6db27e1063d171e8ae0c (patch) | |
tree | 412fd428219bff579523202beb5f418a518920bb /lisp/vc/vc-hg.el | |
parent | 89d0c4451f4807a5f0e1adf9a9df395f84407066 (diff) | |
download | emacs-3a5129a1c963d66a1b2e6db27e1063d171e8ae0c.tar.gz |
vc-hg-dir-status-files: Fix when DIR is not repository root
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
Make sure it works correctly in a subdirectory of the repo root.
Bind default-directory to DIR and add 're: -I .' to the arguments
(bug#39380).
Diffstat (limited to 'lisp/vc/vc-hg.el')
-rw-r--r-- | lisp/vc/vc-hg.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index c9a2cb412e9..a91e1f5ad6c 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1352,14 +1352,14 @@ REV is the revision to check out into WORKFILE." ;; Follows vc-exec-after. (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) -(defun vc-hg-dir-status-files (_dir files update-function) +(defun vc-hg-dir-status-files (dir files update-function) ;; XXX: We can't pass DIR directly to 'hg status' because that ;; returns all ignored files if FILES is non-nil (bug#22481). - ;; If honoring DIR ever becomes important, try using '-I DIR/'. - (vc-hg-command (current-buffer) 'async files - "status" - (concat "-mardu" (if files "i")) - "-C") + (let ((default-directory dir)) + (vc-hg-command (current-buffer) 'async files + "status" "re:" "-I" "." + (concat "-mardu" (if files "i")) + "-C")) (vc-run-delayed (vc-hg-after-dir-status update-function))) |