GNU bug report logs - #7663
23.2; duplicate entries in vc-dir-mode (Windows) due to backslash from svn output

Previous Next

Package: emacs;

Reported by: Vagn Johansen <gonz808 <at> hotmail.com>

Date: Fri, 17 Dec 2010 17:08:02 UTC

Severity: normal

Tags: patch

Merged with 996

Found in version 23.2

Fixed in version 24.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #7 received at 7663-quiet <at> debbugs.gnu.org (full text, mbox):

From: Vagn Johansen <gonz808 <at> hotmail.com>
To: 7663-quiet <at> debbugs.gnu.org
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
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> 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.

[vc-svn-backslash-fix-2.diff (text/x-patch, inline)]
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))
[Message part 3 (text/plain, inline)]
-- 
Vagn Johansen

This bug report was last modified 14 years and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.