unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: AriT93 <arit93@yahoo.com>
Cc: spiegel@gnu.org, emacs-devel@gnu.org
Subject: [arit93@yahoo.com: vc-svn.el and "the underscore hack"]
Date: Tue, 31 Oct 2006 08:57:31 -0600	[thread overview]
Message-ID: <17735.25691.286000.488074@gargle.gargle.HOWL> (raw)
In-Reply-To: <E1GZiqe-0002L9-Ls@fencepost.gnu.org>

Richard Stallman writes:
 > Would someone like to work on this?  There is a proposed patch
 > in the second message.

I have tested this now on both windows and Gentoo GNU/Linux and have
not encountered any issues.  However I have recently been using
psvn.el from http://www.xsteve.at/prg/emacs/psvn.el and in that file
they are using a defun to set the svn admin directory name. The
function checks for environment to determine which directory name to
use (.svn or _svn).  That looks like a better way to do it than what I
did in my patch.  I will attempt to make a similar change to vc-svn.el
and submit a patch if there are no objections.  

I do have one question, is this list the correct place to post that
patch or should it be sent to the subversion people.  vc-svn.el
indicates that this file is maintained here.  I just wanted to make
sure I send it to the right place.

--The following can be ignored if you are uninterested in the patch submitted--
 > 
 > ------- Start of forwarded message -------
 > From: AriT93 <arit93@yahoo.com>
 > MIME-Version: 1.0
 > Content-Type: text/plain; charset=us-ascii
 > Date: Mon, 16 Oct 2006 08:20:59 -0500
 > To: bug-gnu-emacs@gnu.org
 > Subject: vc-svn.el and "the underscore hack"
 > X-Spam-Status: No, score=2.7 required=5.0 tests=FORGED_YAHOO_RCVD,
 > 	FROM_ENDS_IN_NUMS autolearn=no version=3.0.4
 > 
 > This change may be trivial to others but as my elisp is not that
 > strong I though I would submit this.  On the windows platform
 > subversion can be configured to create it's directories as "_svn"
 > instead of the standard ".svn" I believe the reason for this was to
 > ensure it worked with websites served by IIS.  
 > 
 > This setting causes problems with vc-svn on windows.  vc-mode does not
 > recognize these files as being under version control.  To handle this
 > I have just replaced ".svn" with "_svn" in vc-svn.el.  So far I have
 > not seen any negative side effects of making this change.  However it
 > occured to me that there should be a more effective way of handling
 > this.  In looking at the file it would seem that eiter a variable
 > could be used to determine the name of the svn directory or an "or"
 > statement could be used where if no ".svn" directory is found a "_svn"
 > directory could be sought.
 > 
 > As I said my elisp skills are pretty weak but I am trying to get the
 > or statement to work. If I am able to get something working I will
 > submit a patch.
 > 
 > Ari
 > - -- 
 > 
 > enjoy every sandwich
 > 
 >            -- W. Zevon
 > 
 > 
 > _______________________________________________
 > bug-gnu-emacs mailing list
 > bug-gnu-emacs@gnu.org
 > http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
 > ------- End of forwarded message -------
 > 
 > From: AriT93 <arit93@yahoo.com>
 > MIME-Version: 1.0
 > Content-Type: multipart/mixed; boundary="kyqG12eoF5"
 > Date: Mon, 16 Oct 2006 10:02:11 -0500
 > To: bug-gnu-emacs@gnu.org
 > Subject: RE: vc-svn.el and "the underscore hack"
 > X-Spam-Status: No, score=2.7 required=5.0 tests=FORGED_YAHOO_RCVD,
 > 	FROM_ENDS_IN_NUMS autolearn=no version=3.0.4
 > 
 > 
 > --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--
 > 
 > 
 > 
 > 
 > 
 > _______________________________________________
 > Emacs-devel mailing list
 > Emacs-devel@gnu.org
 > http://lists.gnu.org/mailman/listinfo/emacs-devel

-- 

enjoy every sandwich

           -- W. Zevon

  reply	other threads:[~2006-10-31 14:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-17  6:54 [arit93@yahoo.com: vc-svn.el and "the underscore hack"] Richard Stallman
2006-10-31 14:57 ` AriT93 [this message]
2006-11-01  2:14   ` Richard Stallman
2006-11-01 16:29   ` Fwd: vc-svn.el and "the underscore hack" Stefan Monnier
2006-11-01 21:02     ` AriT93
2006-11-02  4:43     ` Richard Stallman
2006-11-05 19:23     ` Richard Stallman
2006-11-07 17:23       ` AriT93
2006-11-08 16:58         ` Richard Stallman
2006-11-08 21:23         ` Kevin Rodgers
2006-11-08 21:32           ` AriT93
2006-11-09  1:00           ` David Kastrup
2006-11-09  1:56         ` Chong Yidong
2006-11-09  2:01           ` David Kastrup
2006-11-09  2:06             ` Juanma Barranquero
2006-11-09  2:55               ` David Kastrup
2006-11-09  3:18           ` AriT93
2006-11-09 23:27           ` Richard Stallman
2006-11-09  3:18         ` Chong Yidong
2006-11-09  3:23           ` AriT93
2006-11-09 16:23           ` AriT93
     [not found] ` <17735.25421.968000.773096@gargle.gargle.HOWL>
2006-11-01  2:14   ` [arit93@yahoo.com: vc-svn.el and "the underscore hack"] Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17735.25691.286000.488074@gargle.gargle.HOWL \
    --to=arit93@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=spiegel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).