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).
This commit is contained in:
parent
89d0c4451f
commit
3a5129a1c9
1 changed files with 6 additions and 6 deletions
|
@ -1352,14 +1352,14 @@ REV is the revision to check out into WORKFILE."
|
||||||
;; Follows vc-exec-after.
|
;; Follows vc-exec-after.
|
||||||
(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
|
(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
|
;; XXX: We can't pass DIR directly to 'hg status' because that
|
||||||
;; returns all ignored files if FILES is non-nil (bug#22481).
|
;; returns all ignored files if FILES is non-nil (bug#22481).
|
||||||
;; If honoring DIR ever becomes important, try using '-I DIR/'.
|
(let ((default-directory dir))
|
||||||
(vc-hg-command (current-buffer) 'async files
|
(vc-hg-command (current-buffer) 'async files
|
||||||
"status"
|
"status" "re:" "-I" "."
|
||||||
(concat "-mardu" (if files "i"))
|
(concat "-mardu" (if files "i"))
|
||||||
"-C")
|
"-C"))
|
||||||
(vc-run-delayed
|
(vc-run-delayed
|
||||||
(vc-hg-after-dir-status update-function)))
|
(vc-hg-after-dir-status update-function)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue