diff options
| author | Dmitry Gutov | 2020-02-11 23:45:52 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2020-02-12 00:29:39 +0200 |
| commit | 3a5129a1c963d66a1b2e6db27e1063d171e8ae0c (patch) | |
| tree | 412fd428219bff579523202beb5f418a518920bb | |
| parent | 89d0c4451f4807a5f0e1adf9a9df395f84407066 (diff) | |
| download | emacs-3a5129a1c963d66a1b2e6db27e1063d171e8ae0c.tar.gz emacs-3a5129a1c963d66a1b2e6db27e1063d171e8ae0c.zip | |
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).
| -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." | |||
| 1352 | ;; Follows vc-exec-after. | 1352 | ;; Follows vc-exec-after. |
| 1353 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) | 1353 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) |
| 1354 | 1354 | ||
| 1355 | (defun vc-hg-dir-status-files (_dir files update-function) | 1355 | (defun vc-hg-dir-status-files (dir files update-function) |
| 1356 | ;; XXX: We can't pass DIR directly to 'hg status' because that | 1356 | ;; XXX: We can't pass DIR directly to 'hg status' because that |
| 1357 | ;; returns all ignored files if FILES is non-nil (bug#22481). | 1357 | ;; returns all ignored files if FILES is non-nil (bug#22481). |
| 1358 | ;; If honoring DIR ever becomes important, try using '-I DIR/'. | 1358 | (let ((default-directory dir)) |
| 1359 | (vc-hg-command (current-buffer) 'async files | 1359 | (vc-hg-command (current-buffer) 'async files |
| 1360 | "status" | 1360 | "status" "re:" "-I" "." |
| 1361 | (concat "-mardu" (if files "i")) | 1361 | (concat "-mardu" (if files "i")) |
| 1362 | "-C") | 1362 | "-C")) |
| 1363 | (vc-run-delayed | 1363 | (vc-run-delayed |
| 1364 | (vc-hg-after-dir-status update-function))) | 1364 | (vc-hg-after-dir-status update-function))) |
| 1365 | 1365 | ||