emacs-31 eb814fbb5cf: vc-hg-state-slow: Run from the repository root

Sean Whitton <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit eb814fbb5cf27498d07c19852320ab24a427b242
Author: Sean Whitton <[email protected]>
Commit: Sean Whitton <[email protected]>

    vc-hg-state-slow: Run from the repository root
    
    * lisp/vc/vc-hg.el (vc-hg-state-slow): Run command from the
    repository root.  This fixes cases where a whole subdirectory no
    longer exists.  We should return 'missing' for any files within
    it.
---
 lisp/vc/vc-hg.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index a45279a574c..c0d92533241 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -236,7 +236,9 @@ A value of `default' means to use the value of `vc-resolve-conflicts'."
   (setq file (expand-file-name file))
   (let*
       ((status nil)
-       (default-directory (file-name-directory file))
+       (root (vc-hg-root file))
+       (file (file-relative-name file root))
+       (default-directory root)
        (out
         (with-output-to-string
           (with-current-buffer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.