From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: AriT93 Newsgroups: gmane.emacs.bugs Subject: RE: vc-svn.el and "the underscore hack" Date: Mon, 16 Oct 2006 10:02:11 -0500 Message-ID: <17715.40691.634000.778758@gargle.gargle.HOWL> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="kyqG12eoF5" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161016444 13730 80.91.229.2 (16 Oct 2006 16:34:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2006 16:34:04 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 16 18:34:03 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GZVPN-0005LD-Jk for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2006 18:33:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZVPN-00029e-65 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2006 12:33:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZTys-00088P-5x for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2006 11:02:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZTyn-00085K-GZ for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2006 11:02:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZTyn-00085H-DD for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2006 11:02:13 -0400 Original-Received: from [138.87.130.210] (helo=syssrv30.ad.ilstu.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GZU7v-0004GR-Cs for bug-gnu-emacs@gnu.org; Mon, 16 Oct 2006 11:11:39 -0400 Original-Received: from SYS270307 ([138.87.130.16]) by syssrv30.ad.ilstu.edu with Microsoft SMTPSVC(6.0.3790.211); Mon, 16 Oct 2006 10:02:15 -0500 Original-To: bug-gnu-emacs@gnu.org X-Mailer: VM 7.19 under Emacs 22.0.50.1 X-OriginalArrivalTime: 16 Oct 2006 15:02:15.0011 (UTC) FILETIME=[10DC6330:01C6F134] X-Mailman-Approved-At: Mon, 16 Oct 2006 12:32:39 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15375 Archived-At: --kyqG12eoF5 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Following up to my previous email. here is a patch that seems to be functioning. As I said my elisp skills are pretty weak. If there is a better way to accomplish these changes I would be very interested in them as a learning experience. --kyqG12eoF5 Content-Type: text/plain Content-Description: vc-svn.patch Content-Disposition: inline; filename="vc-svn.patch" Content-Transfer-Encoding: 7bit --- /cygdrive/c/temp/cvs/emacs/lisp/vc-svn.el 2006-02-08 21:47:00.000000000 -0600 +++ /cygdrive/c/emacs/lisp/vc-svn.el 2006-10-16 09:37:34.240209600 -0500 @@ -100,18 +100,25 @@ This is only meaningful if you don't use ;;; ;;;###autoload (defun vc-svn-registered (f) -;;;###autoload (when (file-readable-p (expand-file-name -;;;###autoload ".svn/entries" (file-name-directory f))) +;;;###autoload (when (or (file-readable-p (expand-file-name +;;;###autoload "_svn/entries" (file-name-directory f))) +;;;###autoload (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/") +(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))) + ;; (when (file-readable-p (expand-file-name "_svn/entries" + ;; (file-name-directory file))) + (when (or(file-readable-p (expand-file-name ".svn/entries" + (file-name-directory file))) + (file-readable-p (expand-file-name "_svn/entries" + (file-name-directory file)))) (with-temp-buffer (cd (file-name-directory file)) (let ((status @@ -206,12 +213,22 @@ COMMENT can be used to provide an initia the SVN command (in that order)." (apply 'vc-svn-command nil 0 file "add" (vc-switches 'SVN 'register))) +;; (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))))) (defun vc-svn-responsible-p (file) "Return non-nil if SVN thinks it is responsible for FILE." - (file-directory-p (expand-file-name ".svn" + (or (file-directory-p (expand-file-name ".svn" (if (file-directory-p file) file - (file-name-directory file))))) + (file-name-directory file)))) +(file-directory-p (expand-file-name "_svn" + (if (file-directory-p file) + file + (file-name-directory file)))))) (defalias 'vc-svn-could-register 'vc-svn-responsible-p "Return non-nil if FILE could be registered in SVN. @@ -476,7 +493,8 @@ and that it passes `vc-svn-global-switch (let ((coding-system-for-read (or file-name-coding-system default-file-name-coding-system))) - (vc-insert-file (expand-file-name ".svn/entries" dirname))) + (or (vc-insert-file (expand-file-name ".svn/entries" dirname)) + (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="". --kyqG12eoF5 Content-Type: text/plain; charset=us-ascii Content-Description: .signature Content-Transfer-Encoding: 7bit -- enjoy every sandwich -- W. Zevon --kyqG12eoF5 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ bug-gnu-emacs mailing list bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs --kyqG12eoF5--