emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch for bug 7553: duplicate entries in vc-dir-mode (Windows) due t


From: Vagn Johansen
Subject: Re: patch for bug 7553: duplicate entries in vc-dir-mode (Windows) due to backslash from svn output
Date: Fri, 25 Feb 2011 19:56:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>
> Thanks.
>
> I think this replacement should be limited to MS-Windows and MS-DOS
> systems, because on Posix platforms, the backslash is a valid
> character in a file name.
>

This should do it. Tested on Windows 7 and Debian 6.

diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 20c7689..274c4a9 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -174,7 +174,10 @@ If you want to force an empty list of arguments, use t."
     (while (re-search-forward re nil t)
       (let ((state (cdr (assq (aref (match-string 1) 0) state-map)))
             (propstat (cdr (assq (aref (match-string 2) 0) state-map)))
-           (filename (match-string 4)))
+           (filename 
+            (if (memq system-type '(windows-nt ms-dos))
+                (replace-regexp-in-string "\\\\" "/" (match-string 4))
+              (match-string 4))))
         (and (memq propstat '(conflict edited))
              (not (eq state 'conflict)) ; conflict always wins
              (setq state propstat))
-- 
Vagn Johansen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]