From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: AriT93 Newsgroups: gmane.emacs.devel Subject: Re: Fwd: vc-svn.el and "the underscore hack" Date: Tue, 7 Nov 2006 11:23:24 -0600 Message-ID: <17744.49420.800000.339491@gargle.gargle.HOWL> References: <17735.25691.286000.488074@gargle.gargle.HOWL> Reply-To: AriT93 NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1162920221 14623 80.91.229.2 (7 Nov 2006 17:23:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Nov 2006 17:23:41 +0000 (UTC) Cc: Stefan Monnier , spiegel@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 07 18:23:35 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GhUfX-0002F9-UE for ged-emacs-devel@m.gmane.org; Tue, 07 Nov 2006 18:23:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GhUfX-0006lm-21 for ged-emacs-devel@m.gmane.org; Tue, 07 Nov 2006 12:23:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GhUfJ-0006l0-JC for emacs-devel@gnu.org; Tue, 07 Nov 2006 12:23:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GhUfG-0006id-R9 for emacs-devel@gnu.org; Tue, 07 Nov 2006 12:23:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GhUfG-0006iX-Kh for emacs-devel@gnu.org; Tue, 07 Nov 2006 12:23:10 -0500 Original-Received: from [138.87.130.210] (helo=syssrv30.ad.ilstu.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GhUfC-0001tK-5I; Tue, 07 Nov 2006 12:23:06 -0500 Original-Received: from SYS270307 ([138.87.130.16]) by syssrv30.ad.ilstu.edu with Microsoft SMTPSVC(6.0.3790.211); Tue, 7 Nov 2006 11:23:27 -0600 Original-To: rms@gnu.org In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.90.1 X-OriginalArrivalTime: 07 Nov 2006 17:23:27.0053 (UTC) FILETIME=[6FADE7D0:01C70291] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61921 Archived-At: Richard Stallman writes: > [I sent this message a week ago but did not get a response. > Could we get the discussion moving again? > > Is this fixed already?] > > As mentioned elsewhere the ".foo -> _foo" transformation is not specific to > Subversion and/or Emacs, so I think we should not handle it specially in > vc-svn.el but instead in a more generic way, maybe directly in the C code or > at least by providing a function that handles it. > > That might be desirable in the long term, but we would have to think > about it. Right now what we want is to fix problems with localized > changes. > > Can you fix this in vc-svn.el? > As I mentioned earlier I have made a different change utilizing the defun from psvn.el since that seemed a cleaner solution that what I had done previously. As described before this patch addresses the issue that vc-svn does not recognize svn repositories on win32 systems that use the "underscore hack" and have the svn admin directory as "_svn" instead of ".svn" In testing this morning i noticed that in order for make bootstrap to work with the change I had to mark it as an autoload. I understand the reason but is this the correct way for the defuns to be used. I guess I'm unclear on why vc-svn-registered needs an autoload. I made svn-wc-adm-dir-name an autoload as it is used in vc-svn-registered. I have included text attributing the chage to the work done in psvn.el I hope that I have done it in a way that is acceptable. Would that text be better suited to the Commentary section? If so let me now and I'll move it and resubmit the patch. changelog entry(per instruction in contributing) 2006-11-7 Ari Turetzky * vc-svn.el: recognize _svn as admin directory on win32 systems patch follows. Index: vc-svn.el =================================================================== RCS file: /sources/emacs/emacs/lisp/vc-svn.el,v retrieving revision 1.28 diff -c -r1.28 vc-svn.el *** vc-svn.el 20 Oct 2006 07:56:20 -0000 1.28 --- vc-svn.el 7 Nov 2006 15:32:14 -0000 *************** *** 99,116 **** ;;; State-querying functions ;;; ;;;###autoload (defun vc-svn-registered (f) ;;;###autoload (when (file-readable-p (expand-file-name ! ;;;###autoload ".svn/entries" (file-name-directory f))) ;;;###autoload (load "vc-svn") ;;;###autoload (vc-svn-registered f))) ;;;###autoload ! (add-to-list 'completion-ignored-extensions ".svn/") (defun vc-svn-registered (file) "Check if FILE is SVN registered." ! (when (file-readable-p (expand-file-name ".svn/entries" (file-name-directory file))) (with-temp-buffer (cd (file-name-directory file)) --- 99,133 ---- ;;; State-querying functions ;;; + ;; This is taken form psvn.el + ;; Copyright (C) 2002-2006 by Stefan Reichoer + ;; Author: Stefan Reichoer, + ;; available at http://www.xsteve.at/prg/emacs/psvn.el + ;; named after SVN_WC_ADM_DIR_NAME in svn_wc.h + ;;;###autoload (defun svn-wc-adm-dir-name () + ;;;###autoload "Return the name of the \".svn\" subdirectory or equivalent." + ;;;###autoload (if (and (eq system-type 'windows-nt) + ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) + ;;;###autoload "_svn" + ;;;###autoload ".svn")) + + ;;;###autoload (defun vc-svn-registered (f) ;;;###autoload (when (file-readable-p (expand-file-name ! ;;;###autoload (concat (svn-wc-adm-dir-name) "/entries") (file-name-directory f))) ;;;###autoload (load "vc-svn") ;;;###autoload (vc-svn-registered f))) ;;;###autoload ! (add-to-list 'completion-ignored-extensions (svn-wc-adm-dir-name)) ! ! ! ! (defun vc-svn-registered (file) "Check if FILE is SVN registered." ! (when (file-readable-p (expand-file-name (concat (svn-wc-adm-dir-name) "/entries") (file-name-directory file))) (with-temp-buffer (cd (file-name-directory file)) *************** *** 206,212 **** (defun vc-svn-responsible-p (file) "Return non-nil if SVN thinks it is responsible for FILE." ! (file-directory-p (expand-file-name ".svn" (if (file-directory-p file) file (file-name-directory file))))) --- 223,229 ---- (defun vc-svn-responsible-p (file) "Return non-nil if SVN thinks it is responsible for FILE." ! (file-directory-p (expand-file-name (svn-wc-adm-dir-name) (if (file-directory-p file) file (file-name-directory file))))) *************** *** 474,480 **** (let ((coding-system-for-read (or file-name-coding-system default-file-name-coding-system))) ! (vc-insert-file (expand-file-name ".svn/entries" dirname))) (goto-char (point-min)) (when (re-search-forward ;; Old `svn' used name="svn:dir", newer use just name="". --- 491,497 ---- (let ((coding-system-for-read (or file-name-coding-system default-file-name-coding-system))) ! (vc-insert-file (expand-file-name (concat (svn-wc-adm-dir-name) "/entries") dirname))) (goto-char (point-min)) (when (re-search-forward ;; Old `svn' used name="svn:dir", newer use just name="". -- enjoy every sandwich -- W. Zevon