diff options
| author | Eli Zaretskii | 2025-08-16 19:40:11 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-08-16 19:40:44 +0100 |
| commit | f8cb751ac0a403bc3769cac9816ad46809b7740e (patch) | |
| tree | e7d77b6834377d16c5e7a35e5676cdc8562152ac | |
| parent | 85dcf4fe96941e00f88a68859e8b720ef6e09282 (diff) | |
| download | emacs-f8cb751ac0a403bc3769cac9816ad46809b7740e.tar.gz emacs-f8cb751ac0a403bc3769cac9816ad46809b7740e.zip | |
vc-hg-known-other-working-trees: Fix on MS-Windows
* lisp/vc/vc-hg.el (vc-hg-known-other-working-trees): Use
expand-file-name to convert paths from .hg/sharedpath files.
| -rw-r--r-- | lisp/vc/vc-hg.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index e9095b72098..b0e5a633566 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -1738,7 +1738,10 @@ Intended for use via the `vc-hg--async-command' wrapper." | |||
| 1738 | (if (file-exists-p our-sp) | 1738 | (if (file-exists-p our-sp) |
| 1739 | (with-temp-buffer | 1739 | (with-temp-buffer |
| 1740 | (insert-file-contents-literally our-sp) | 1740 | (insert-file-contents-literally our-sp) |
| 1741 | (setq our-store (string-trim (buffer-string))) | 1741 | ;; On MS-Windows, ".hg/sharedpath" gives file names with |
| 1742 | ;; backslashes; expand-file-name normalizes that to forward | ||
| 1743 | ;; slashes, needed for 'equal' comparison below. | ||
| 1744 | (setq our-store (expand-file-name (string-trim (buffer-string)))) | ||
| 1742 | (push (abbreviate-file-name (file-name-directory our-store)) | 1745 | (push (abbreviate-file-name (file-name-directory our-store)) |
| 1743 | shares)) | 1746 | shares)) |
| 1744 | (setq our-store (expand-file-name ".hg" our-root))) | 1747 | (setq our-store (expand-file-name ".hg" our-root))) |
| @@ -1748,7 +1751,9 @@ Intended for use via the `vc-hg--async-command' wrapper." | |||
| 1748 | ((file-exists-p sp))) | 1751 | ((file-exists-p sp))) |
| 1749 | (with-temp-buffer | 1752 | (with-temp-buffer |
| 1750 | (insert-file-contents-literally sp) | 1753 | (insert-file-contents-literally sp) |
| 1751 | (when (equal our-store (buffer-string)) | 1754 | (when (equal our-store |
| 1755 | ;; See above why we use expand-file-name | ||
| 1756 | (expand-file-name (string-trim (buffer-string)))) | ||
| 1752 | (push root shares))))) | 1757 | (push root shares))))) |
| 1753 | shares)) | 1758 | shares)) |
| 1754 | 1759 | ||