* [arit93@yahoo.com: vc-svn.el and "the underscore hack"]
@ 2006-10-17 6:54 Richard Stallman
2006-10-31 14:57 ` AriT93
[not found] ` <17735.25421.968000.773096@gargle.gargle.HOWL>
0 siblings, 2 replies; 22+ messages in thread
From: Richard Stallman @ 2006-10-17 6:54 UTC (permalink / raw)
Would someone like to work on this? There is a proposed patch
in the second message.
------- 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--
^ permalink raw reply [flat|nested] 22+ messages in thread
* [arit93@yahoo.com: vc-svn.el and "the underscore hack"]
2006-10-17 6:54 [arit93@yahoo.com: vc-svn.el and "the underscore hack"] Richard Stallman
@ 2006-10-31 14:57 ` AriT93
2006-11-01 2:14 ` Richard Stallman
2006-11-01 16:29 ` Fwd: vc-svn.el and "the underscore hack" Stefan Monnier
[not found] ` <17735.25421.968000.773096@gargle.gargle.HOWL>
1 sibling, 2 replies; 22+ messages in thread
From: AriT93 @ 2006-10-31 14:57 UTC (permalink / raw)
Cc: spiegel, emacs-devel
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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [arit93@yahoo.com: vc-svn.el and "the underscore hack"]
2006-10-31 14:57 ` AriT93
@ 2006-11-01 2:14 ` Richard Stallman
2006-11-01 16:29 ` Fwd: vc-svn.el and "the underscore hack" Stefan Monnier
1 sibling, 0 replies; 22+ messages in thread
From: Richard Stallman @ 2006-11-01 2:14 UTC (permalink / raw)
Cc: spiegel, emacs-devel
You sent it to the right place. Thank you.
Now it is our job to make use of your suggestion.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-10-31 14:57 ` AriT93
2006-11-01 2:14 ` Richard Stallman
@ 2006-11-01 16:29 ` Stefan Monnier
2006-11-01 21:02 ` AriT93
` (2 more replies)
1 sibling, 3 replies; 22+ messages in thread
From: Stefan Monnier @ 2006-11-01 16:29 UTC (permalink / raw)
Cc: rms, spiegel, emacs-devel
>> 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.
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.
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
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
2 siblings, 0 replies; 22+ messages in thread
From: AriT93 @ 2006-11-01 21:02 UTC (permalink / raw)
Cc: Stefan Monnier, spiegel, rms
Stefan Monnier writes:
>--snip--<
>
> 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.
>
>
> Stefan
Thank you for your reply. I am unclear on where else it was mentioned
about the transformation, it is possible I missed a reply.
I was not aware that vc-svn.el interacted with any subversion specific
functions in the C code. From reading through vc-svn.el it appeared to
just call the svn executable for any svn functions. The change that I
had proposed mostly just made sure that vc-svn.el was aware of this
possibility, since not checking for the _svn directory would cause it
to incorrectly assume that files were not under subversion control.
So this would not be a case of .foo -> _foo but specifically .svn ->
_svn.
I'm not trying to be argumentative and appreciate your response.
--
enjoy every sandwich
-- W. Zevon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
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
2 siblings, 0 replies; 22+ messages in thread
From: Richard Stallman @ 2006-11-02 4:43 UTC (permalink / raw)
Cc: arit93, spiegel, emacs-devel
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?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
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
2 siblings, 1 reply; 22+ messages in thread
From: Richard Stallman @ 2006-11-05 19:23 UTC (permalink / raw)
Cc: arit93, spiegel, emacs-devel
[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?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-05 19:23 ` Richard Stallman
@ 2006-11-07 17:23 ` AriT93
2006-11-08 16:58 ` Richard Stallman
` (3 more replies)
0 siblings, 4 replies; 22+ messages in thread
From: AriT93 @ 2006-11-07 17:23 UTC (permalink / raw)
Cc: Stefan Monnier, spiegel, emacs-devel
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 <arit93@yahoo.com>
* 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, <stefan@xsteve.at>
+ ;; 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
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-07 17:23 ` AriT93
@ 2006-11-08 16:58 ` Richard Stallman
2006-11-08 21:23 ` Kevin Rodgers
` (2 subsequent siblings)
3 siblings, 0 replies; 22+ messages in thread
From: Richard Stallman @ 2006-11-08 16:58 UTC (permalink / raw)
Cc: monnier, spiegel, emacs-devel
I can't begin to judge whether this change is correct, but I can say
that Stefan Reichoer's code is small enough to count as a tiny change.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
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 3:18 ` Chong Yidong
3 siblings, 2 replies; 22+ messages in thread
From: Kevin Rodgers @ 2006-11-08 21:23 UTC (permalink / raw)
AriT93 wrote:
> 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.
Wouldn't it be simpler and more reliable to change
(when (file-readable-p (expand-file-name ".svn" FILE))
;; refer to (expand-file-name ".svn" FILE) here
...)
to
(let (svn-file)
(cond ((file-readable-p (setq svn-file (expand-file-name ".svn" FILE))))
((file-readable-p (setq svn-file (expand-file-name "_svn" FILE))))
(t (setq svn-file nil)))
(when svn-file
;; refer to svn-file here
...))
and similarly for the file-directory-p and vc-insert-file calls?
--
Kevin
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-08 21:23 ` Kevin Rodgers
@ 2006-11-08 21:32 ` AriT93
2006-11-09 1:00 ` David Kastrup
1 sibling, 0 replies; 22+ messages in thread
From: AriT93 @ 2006-11-08 21:32 UTC (permalink / raw)
Cc: emacs-devel
Kevin Rodgers writes:
> AriT93 wrote:
> > 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.
>
> Wouldn't it be simpler and more reliable to change
>
> (when (file-readable-p (expand-file-name ".svn" FILE))
> ;; refer to (expand-file-name ".svn" FILE) here
> ...)
>
> to
>
> (let (svn-file)
> (cond ((file-readable-p (setq svn-file (expand-file-name ".svn" FILE))))
> ((file-readable-p (setq svn-file (expand-file-name "_svn" FILE))))
> (t (setq svn-file nil)))
> (when svn-file
> ;; refer to svn-file here
> ...))
>
> and similarly for the file-directory-p and vc-insert-file calls?
>
> --
> Kevin
>
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
That would be similar to the first patch that I submitted. it seemed
to me that this method might be a bit easier to maintain long term as
the decision to use .svn over _svn is in one place. Although the
statements above could also set svn-file in the same way I suppose.
--
enjoy every sandwich
-- W. Zevon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-08 21:23 ` Kevin Rodgers
2006-11-08 21:32 ` AriT93
@ 2006-11-09 1:00 ` David Kastrup
1 sibling, 0 replies; 22+ messages in thread
From: David Kastrup @ 2006-11-09 1:00 UTC (permalink / raw)
Cc: emacs-devel
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> Wouldn't it be simpler and more reliable to change
>
> (when (file-readable-p (expand-file-name ".svn" FILE))
> ;; refer to (expand-file-name ".svn" FILE) here
> ...)
>
> to
>
> (let (svn-file)
> (cond ((file-readable-p (setq svn-file (expand-file-name ".svn" FILE))))
> ((file-readable-p (setq svn-file (expand-file-name "_svn" FILE))))
> (t (setq svn-file nil)))
> (when svn-file
> ;; refer to svn-file here
> ...))
>
> and similarly for the file-directory-p and vc-insert-file calls?
Does either work under VMS where `expand-file-name' does a different
string manipulation than with Unix?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-07 17:23 ` AriT93
2006-11-08 16:58 ` Richard Stallman
2006-11-08 21:23 ` Kevin Rodgers
@ 2006-11-09 1:56 ` Chong Yidong
2006-11-09 2:01 ` David Kastrup
` (2 more replies)
2006-11-09 3:18 ` Chong Yidong
3 siblings, 3 replies; 22+ messages in thread
From: Chong Yidong @ 2006-11-09 1:56 UTC (permalink / raw)
Cc: emacs-devel, rms, spiegel, Stefan Monnier
AriT93 <arit93@yahoo.com> writes:
> + ;; This is taken form psvn.el
> + ;; Copyright (C) 2002-2006 by Stefan Reichoer
> + ;; Author: Stefan Reichoer, <stefan@xsteve.at>
> + ;; available at http://www.xsteve.at/prg/emacs/psvn.el
> + ;; named after SVN_WC_ADM_DIR_NAME in svn_wc.h
Do we really want this chunk of code in Emacs?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-09 1:56 ` Chong Yidong
@ 2006-11-09 2:01 ` David Kastrup
2006-11-09 2:06 ` Juanma Barranquero
2006-11-09 3:18 ` AriT93
2006-11-09 23:27 ` Richard Stallman
2 siblings, 1 reply; 22+ messages in thread
From: David Kastrup @ 2006-11-09 2:01 UTC (permalink / raw)
Cc: AriT93, Stefan Monnier, rms, spiegel, emacs-devel
Chong Yidong <cyd@stupidchicken.com> writes:
> AriT93 <arit93@yahoo.com> writes:
>
>> + ;; This is taken form psvn.el
>> + ;; Copyright (C) 2002-2006 by Stefan Reichoer
>> + ;; Author: Stefan Reichoer, <stefan@xsteve.at>
>> + ;; available at http://www.xsteve.at/prg/emacs/psvn.el
>> + ;; named after SVN_WC_ADM_DIR_NAME in svn_wc.h
>
> Do we really want this chunk of code in Emacs?
We probably would not want to point out copyrights when we take code
from Emacs for Emacs... I'd probably leave the first and maybe last
line of the chunk.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-09 2:01 ` David Kastrup
@ 2006-11-09 2:06 ` Juanma Barranquero
2006-11-09 2:55 ` David Kastrup
0 siblings, 1 reply; 22+ messages in thread
From: Juanma Barranquero @ 2006-11-09 2:06 UTC (permalink / raw)
On 11/9/06, David Kastrup <dak@gnu.org> wrote:
> >> + ;; This is taken form psvn.el
> >> + ;; Copyright (C) 2002-2006 by Stefan Reichoer
> >> + ;; Author: Stefan Reichoer, <stefan@xsteve.at>
> >> + ;; available at http://www.xsteve.at/prg/emacs/psvn.el
> >> + ;; named after SVN_WC_ADM_DIR_NAME in svn_wc.h
> We probably would not want to point out copyrights when we take code
> from Emacs for Emacs...
Presumably psvn.el and svn_wc.h are from the Subversion distribution, not Emacs?
/L/e/k/t/u
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-09 2:06 ` Juanma Barranquero
@ 2006-11-09 2:55 ` David Kastrup
0 siblings, 0 replies; 22+ messages in thread
From: David Kastrup @ 2006-11-09 2:55 UTC (permalink / raw)
Cc: emacs-devel
"Juanma Barranquero" <lekktu@gmail.com> writes:
> On 11/9/06, David Kastrup <dak@gnu.org> wrote:
>
>> >> + ;; This is taken form psvn.el
>> >> + ;; Copyright (C) 2002-2006 by Stefan Reichoer
>> >> + ;; Author: Stefan Reichoer, <stefan@xsteve.at>
>> >> + ;; available at http://www.xsteve.at/prg/emacs/psvn.el
>> >> + ;; named after SVN_WC_ADM_DIR_NAME in svn_wc.h
>
>> We probably would not want to point out copyrights when we take code
>> from Emacs for Emacs...
>
> Presumably psvn.el and svn_wc.h are from the Subversion
> distribution, not Emacs?
In that case one should ask Stefan Reichör whether he is ok with
taking this code. He already has an assignment for Emacs on file
(from 2005 IIRC), so no actual paperwork would be required, just a
confirmation from that this code might be used under the existing
assignment.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-09 1:56 ` Chong Yidong
2006-11-09 2:01 ` David Kastrup
@ 2006-11-09 3:18 ` AriT93
2006-11-09 23:27 ` Richard Stallman
2 siblings, 0 replies; 22+ messages in thread
From: AriT93 @ 2006-11-09 3:18 UTC (permalink / raw)
Cc: AriT93, Stefan Monnier, rms, spiegel, emacs-devel
Chong Yidong writes:
> AriT93 <arit93@yahoo.com> writes:
>
> > + ;; This is taken form psvn.el
> > + ;; Copyright (C) 2002-2006 by Stefan Reichoer
> > + ;; Author: Stefan Reichoer, <stefan@xsteve.at>
> > + ;; available at http://www.xsteve.at/prg/emacs/psvn.el
> > + ;; named after SVN_WC_ADM_DIR_NAME in svn_wc.h
>
> Do we really want this chunk of code in Emacs?
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
My reasoning for that was that I did not want to claim credit for the
work of others. I included that from psvn so that credit would go to
the proper party. psvn.el is released under the GPL.
--
enjoy every sandwich
-- W. Zevon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-09 1:56 ` Chong Yidong
2006-11-09 2:01 ` David Kastrup
2006-11-09 3:18 ` AriT93
@ 2006-11-09 23:27 ` Richard Stallman
2 siblings, 0 replies; 22+ messages in thread
From: Richard Stallman @ 2006-11-09 23:27 UTC (permalink / raw)
Cc: arit93, monnier, spiegel, emacs-devel
> + ;; Copyright (C) 2002-2006 by Stefan Reichoer
> + ;; Author: Stefan Reichoer, <stefan@xsteve.at>
> + ;; available at http://www.xsteve.at/prg/emacs/psvn.el
> + ;; named after SVN_WC_ADM_DIR_NAME in svn_wc.h
Do we really want this chunk of code in Emacs?
It is small enough to be a tiny change, so we could use
it without papers. We would not need to copy those
notices either. However, since Reichoer has signed
papers for Emacs, we can ask him to agree that this
constitutes a change to Emacs, and use it on that basis.
(Since you fixed the problem another way, we don't need to do
either one, but I figure it is useful to answer the question anyway.)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-07 17:23 ` AriT93
` (2 preceding siblings ...)
2006-11-09 1:56 ` Chong Yidong
@ 2006-11-09 3:18 ` Chong Yidong
2006-11-09 3:23 ` AriT93
2006-11-09 16:23 ` AriT93
3 siblings, 2 replies; 22+ messages in thread
From: Chong Yidong @ 2006-11-09 3:18 UTC (permalink / raw)
Cc: emacs-devel, rms, spiegel, Stefan Monnier
I checked in a slightly different fix, in order to avoid autoloading a
new function just for the sake of VC-SVN users on Windows. Thanks for
the heads-up.
By the way, I left completion-ignored-extensions as it is, rather than
adding "_svn/". I don't think this corner case warrants its own entry
in completion-ignored-extensions for everyone, and I couldn't think of
a way to do it cleanly for Windows users (and I don't know if it's
desirable even for them).
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-09 3:18 ` Chong Yidong
@ 2006-11-09 3:23 ` AriT93
2006-11-09 16:23 ` AriT93
1 sibling, 0 replies; 22+ messages in thread
From: AriT93 @ 2006-11-09 3:23 UTC (permalink / raw)
Cc: AriT93, Stefan Monnier, rms, spiegel, emacs-devel
Chong Yidong writes:
> I checked in a slightly different fix, in order to avoid autoloading a
> new function just for the sake of VC-SVN users on Windows. Thanks for
> the heads-up.
>
> By the way, I left completion-ignored-extensions as it is, rather than
> adding "_svn/". I don't think this corner case warrants its own entry
> in completion-ignored-extensions for everyone, and I couldn't think of
> a way to do it cleanly for Windows users (and I don't know if it's
> desirable even for them).
>
Excellent, Thank you!
--
enjoy every sandwich
-- W. Zevon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Fwd: vc-svn.el and "the underscore hack"
2006-11-09 3:18 ` Chong Yidong
2006-11-09 3:23 ` AriT93
@ 2006-11-09 16:23 ` AriT93
1 sibling, 0 replies; 22+ messages in thread
From: AriT93 @ 2006-11-09 16:23 UTC (permalink / raw)
Cc: Stefan Monnier, rms, spiegel, emacs-devel
Chong Yidong writes:
> I checked in a slightly different fix, in order to avoid autoloading a
> new function just for the sake of VC-SVN users on Windows. Thanks for
> the heads-up.
>
Pulled down the changes this morning and rebuilt. Everything is
working as expected. Thank you again.
--
enjoy every sandwich
-- W. Zevon
^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <17735.25421.968000.773096@gargle.gargle.HOWL>]
end of thread, other threads:[~2006-11-09 23:27 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-17 6:54 [arit93@yahoo.com: vc-svn.el and "the underscore hack"] Richard Stallman
2006-10-31 14:57 ` AriT93
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.