emacs-devel
[Top][All Lists]
Advanced

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

Re: Fwd: vc-svn.el and "the underscore hack"


From: AriT93
Subject: Re: Fwd: vc-svn.el and "the underscore hack"
Date: Tue, 7 Nov 2006 11:23:24 -0600

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 <address@hidden>

                   * 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, <address@hidden>
+ ;; 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




reply via email to

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