From fc2fb30ca60f74600060ea6fdb55560f87b350e1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 19 Feb 2007 19:42:10 +0000 Subject: [PATCH] Remove the code inherited from CVSREAD and `cvs edit'. (vc-svn-use-edit): Remove unused config var. (vc-svn-update, vc-svn-revert): Checkout is always implicit. --- lisp/ChangeLog | 4 ++++ lisp/vc-svn.el | 44 ++++++++++++++------------------------------ 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7bea73a2329..794db2e53eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2007-02-19 Stefan Monnier + * vc-svn.el: Remove the code inherited from CVSREAD and `cvs edit'. + (vc-svn-use-edit): Remove unused config var. + (vc-svn-update, vc-svn-revert): Checkout is always implicit. + * outline.el (hide-sublevels): Keep empty last line, if available. * buff-menu.el (list-buffers-noselect): Use explicit unicode code diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 730806fdcd0..1538a2a1ab3 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -85,18 +85,12 @@ If you want to force an empty list of arguments, use t." :type '(repeat string) :group 'vc) -(defconst vc-svn-use-edit nil - ;; Subversion does not provide this feature (yet). - "*Non-nil means to use `svn edit' to \"check out\" a file. -This is only meaningful if you don't use the implicit checkout model -\(i.e. if you have $SVNREAD set)." - ;; :type 'boolean - ;; :version "22.1" - ;; :group 'vc - ) - -(defvar vc-svn-admin-directory - (cond ((and (eq system-type 'windows-nt) +;; We want to autoload it for use by the autoloaded version of +;; vc-svn-registered, but we want the value to be compiled at startup, not +;; at dump time. +;; ;;;###autoload +(defconst vc-svn-admin-directory + (cond ((and (memq system-type '(cygwin windows-nt ms-dos)) (getenv "SVN_ASP_DOT_NET_HACK")) "_svn") (t ".svn")) @@ -111,12 +105,12 @@ This is only meaningful if you don't use the implicit checkout model ;;;###autoload (defun vc-svn-registered (f) ;;;###autoload (let ((admin-dir (cond ((and (eq system-type 'windows-nt) -;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) -;;;###autoload "_svn") -;;;###autoload (t ".svn")))) +;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK")) +;;;###autoload "_svn") +;;;###autoload (t ".svn")))) ;;;###autoload (when (file-readable-p (expand-file-name -;;;###autoload (concat admin-dir "/entries") -;;;###autoload (file-name-directory f))) +;;;###autoload (concat admin-dir "/entries") +;;;###autoload (file-name-directory f))) ;;;###autoload (load "vc-svn") ;;;###autoload (vc-svn-registered f)))) @@ -274,13 +268,8 @@ This is only possible if SVN is responsible for FILE's directory.") (defun vc-svn-update (file editable rev switches) (if (and (file-exists-p file) (not rev)) - ;; If no revision was specified, just make the file writable - ;; if necessary (using `svn-edit' if requested). - (and editable (not (eq (vc-svn-checkout-model file) 'implicit)) - (if vc-svn-use-edit - (vc-svn-command nil 0 file "edit") - (set-file-modes file (logior (file-modes file) 128)) - (if (equal file buffer-file-name) (toggle-read-only -1)))) + ;; If no revision was specified, there's nothing to do. + nil ;; Check out a particular version (or recreate the file). (vc-file-setprop file 'vc-workfile-version nil) (apply 'vc-svn-command nil 0 file @@ -302,12 +291,7 @@ This is only possible if SVN is responsible for FILE's directory.") (defun vc-svn-revert (file &optional contents-done) "Revert FILE to the version it was based on." (unless contents-done - (vc-svn-command nil 0 file "revert")) - (unless (eq (vc-checkout-model file) 'implicit) - (if vc-svn-use-edit - (vc-svn-command nil 0 file "unedit") - ;; Make the file read-only by switching off all w-bits - (set-file-modes file (logand (file-modes file) 3950))))) + (vc-svn-command nil 0 file "revert"))) (defun vc-svn-merge (file first-version &optional second-version) "Merge changes into current working copy of FILE. -- 2.39.2