;; Follows vc-exec-after.
(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
-(defun vc-hg-dir-status-files (dir files update-function)
- (apply 'vc-hg-command (current-buffer) 'async dir "status"
- (concat "-mardu" (if files "i"))
- "-C" files)
+(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")
(vc-run-delayed
(vc-hg-after-dir-status update-function)))