aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2014-12-10 12:33:26 -0500
committerEric S. Raymond2014-12-10 12:33:26 -0500
commit8bc7ac5c25f42b745cc90131a9a456f763582dbf (patch)
tree9610a5cd223dd71e8349ad15a1abc76139046f99
parentbdc373bf456de464b44836b11826705c0aef70b1 (diff)
downloademacs-8bc7ac5c25f42b745cc90131a9a456f763582dbf.tar.gz
emacs-8bc7ac5c25f42b745cc90131a9a456f763582dbf.zip
Righteous featurectomy of vc-keep-workfiles - always do it.
* vc/vc-dispatcher.el, vc/vc-hooks.el, vc/vc-rcs.el, vc/vc-sccs.el, vc/vc.el: Righteous featurectomy of vc-keep-workfiles, it's a shoot-self-in-foot archaism. Workfiles are always kept.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/vc/vc-dispatcher.el2
-rw-r--r--lisp/vc/vc-hooks.el7
-rw-r--r--lisp/vc/vc-rcs.el9
-rw-r--r--lisp/vc/vc-sccs.el12
-rw-r--r--lisp/vc/vc.el8
6 files changed, 18 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 53c03e0f106..d5f22541dcf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12014-12-10 Eric S. Raymond <esr@snark.thyrsus.com>
2
3 * vc/vc-dispatcher.el, vc/vc-hooks.el, vc/vc-rcs.el,
4 vc/vc-sccs.el, vc/vc.el: Righteous featurectomy of
5 vc-keep-workfiles, it's a shoot-self-in-foot archaism.
6 Workfiles are always kept.
7
12014-12-10 Rasmus Pank Roulund <emacs@pank.eu> 82014-12-10 Rasmus Pank Roulund <emacs@pank.eu>
2 9
3 * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing 10 * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index d2125d57ba4..e1bf05c8916 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -702,7 +702,7 @@ the buffer contents as a comment."
702 ;; Now make sure we see the expanded headers 702 ;; Now make sure we see the expanded headers
703 (when log-fileset 703 (when log-fileset
704 (mapc 704 (mapc
705 (lambda (file) (vc-resynch-buffer file vc-keep-workfiles t)) 705 (lambda (file) (vc-resynch-buffer file t t))
706 log-fileset)) 706 log-fileset))
707 (when (vc-dispatcher-browsing) 707 (when (vc-dispatcher-browsing)
708 (vc-dir-move-to-goal-column)) 708 (vc-dir-move-to-goal-column))
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 9a4fe162843..0ffca5645e2 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -164,13 +164,6 @@ Otherwise, not displayed."
164 :type 'boolean 164 :type 'boolean
165 :group 'vc) 165 :group 'vc)
166 166
167(defcustom vc-keep-workfiles t
168 "Whether to keep work files on disk after commits, on a locking VCS.
169This variable has no effect on modern merging-based version
170control systems."
171 :type 'boolean
172 :group 'vc)
173
174;;; This is handled specially now. 167;;; This is handled specially now.
175;; Tell Emacs about this new kind of minor mode 168;; Tell Emacs about this new kind of minor mode
176;; (add-to-list 'minor-mode-alist '(vc-mode vc-mode)) 169;; (add-to-list 'minor-mode-alist '(vc-mode vc-mode))
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 20b292f5fe8..9bb9af1ab47 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -226,12 +226,10 @@ When VERSION is given, perform check for that version."
226 226
227(defun vc-rcs-register (files &optional comment) 227(defun vc-rcs-register (files &optional comment)
228 "Register FILES into the RCS version-control system. 228 "Register FILES into the RCS version-control system.
229Automatically retrieve a read-only version of the file with keywords expanded.
229COMMENT can be used to provide an initial description for each FILES. 230COMMENT can be used to provide an initial description for each FILES.
230Passes either `vc-rcs-register-switches' or `vc-register-switches' 231Passes either `vc-rcs-register-switches' or `vc-register-switches'
231to the RCS command. 232to the RCS command."
232
233Automatically retrieve a read-only version of the file with keywords
234expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
235 (let (subdir name) 233 (let (subdir name)
236 (dolist (file files) 234 (dolist (file files)
237 (and (not (file-exists-p 235 (and (not (file-exists-p
@@ -244,6 +242,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
244 (apply #'vc-do-command "*vc*" 0 "ci" file 242 (apply #'vc-do-command "*vc*" 0 "ci" file
245 ;; if available, use the secure registering option 243 ;; if available, use the secure registering option
246 (and (vc-rcs-release-p "5.6.4") "-i") 244 (and (vc-rcs-release-p "5.6.4") "-i")
245 "-u"
247 (and comment (concat "-t-" comment)) 246 (and comment (concat "-t-" comment))
248 (vc-switches 'RCS 'register)) 247 (vc-switches 'RCS 'register))
249 ;; parse output to find master file name and workfile version 248 ;; parse output to find master file name and workfile version
@@ -328,7 +327,7 @@ whether to remove it."
328 (apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file) 327 (apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file)
329 ;; if available, use the secure check-in option 328 ;; if available, use the secure check-in option
330 (and (vc-rcs-release-p "5.6.4") "-j") 329 (and (vc-rcs-release-p "5.6.4") "-j")
331 (concat (if vc-keep-workfiles "-u" "-r") rev) 330 (concat "-u" rev)
332 (concat "-m" comment) 331 (concat "-m" comment)
333 switches) 332 switches)
334 (vc-file-setprop file 'vc-working-revision nil) 333 (vc-file-setprop file 'vc-working-revision nil)
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index c7144c0a223..a8e122d6f93 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -195,12 +195,10 @@ Optional string REV is a revision."
195 195
196(defun vc-sccs-register (files &optional comment) 196(defun vc-sccs-register (files &optional comment)
197 "Register FILES into the SCCS version-control system. 197 "Register FILES into the SCCS version-control system.
198Automatically retrieve a read-only version of the files with keywords expanded.
198COMMENT can be used to provide an initial description of FILES. 199COMMENT can be used to provide an initial description of FILES.
199Passes either `vc-sccs-register-switches' or `vc-register-switches' 200Passes either `vc-sccs-register-switches' or `vc-register-switches'
200to the SCCS command. 201to the SCCS command."
201
202Automatically retrieve a read-only version of the files with keywords
203expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
204 (dolist (file files) 202 (dolist (file files)
205 (let* ((dirname (or (file-name-directory file) "")) 203 (let* ((dirname (or (file-name-directory file) ""))
206 (basename (file-name-nondirectory file)) 204 (basename (file-name-nondirectory file))
@@ -214,8 +212,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
214 (and comment (concat "-y" comment)) 212 (and comment (concat "-y" comment))
215 (vc-switches 'SCCS 'register))) 213 (vc-switches 'SCCS 'register)))
216 (delete-file file) 214 (delete-file file)
217 (if vc-keep-workfiles 215 (vc-sccs-do-command nil 0 "get" (vc-master-name file)))))
218 (vc-sccs-do-command nil 0 "get" (vc-master-name file))))))
219 216
220(defun vc-sccs-responsible-p (file) 217(defun vc-sccs-responsible-p (file)
221 "Return non-nil if SCCS thinks it would be responsible for registering FILE." 218 "Return non-nil if SCCS thinks it would be responsible for registering FILE."
@@ -230,8 +227,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
230 (apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file) 227 (apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file)
231 (concat "-y" comment) 228 (concat "-y" comment)
232 (vc-switches 'SCCS 'checkin)) 229 (vc-switches 'SCCS 'checkin))
233 (if vc-keep-workfiles 230 (vc-sccs-do-command nil 0 "get" (vc-master-name file))))
234 (vc-sccs-do-command nil 0 "get" (vc-master-name file)))))
235 231
236(defun vc-sccs-find-revision (file rev buffer) 232(defun vc-sccs-find-revision (file rev buffer)
237 (apply 'vc-sccs-do-command 233 (apply 'vc-sccs-do-command
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 6e0e2c657b1..3ea48096fdd 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1111,8 +1111,7 @@ For old-style locking-based version control systems, like RCS:
1111 If every file is registered and unlocked, check out (lock) 1111 If every file is registered and unlocked, check out (lock)
1112 the file(s) for editing. 1112 the file(s) for editing.
1113 If every file is locked by you and has changes, pop up a 1113 If every file is locked by you and has changes, pop up a
1114 *vc-log* buffer to check in the changes. If the variable 1114 *vc-log* buffer to check in the changes. Leave a
1115 `vc-keep-workfiles' is non-nil (the default), leave a
1116 read-only copy of each changed file after checking in. 1115 read-only copy of each changed file after checking in.
1117 If every file is locked by you and unchanged, unlock them. 1116 If every file is locked by you and unchanged, unlock them.
1118 If every file is locked by someone else, offer to steal the lock." 1117 If every file is locked by someone else, offer to steal the lock."
@@ -1353,7 +1352,7 @@ first backend that could register the file is used."
1353 ;; (make-local-variable 'backup-inhibited) 1352 ;; (make-local-variable 'backup-inhibited)
1354 ;; (setq backup-inhibited t)) 1353 ;; (setq backup-inhibited t))
1355 1354
1356 (vc-resynch-buffer file vc-keep-workfiles t)) 1355 (vc-resynch-buffer file t t))
1357 files) 1356 files)
1358 (when (derived-mode-p 'vc-dir-mode) 1357 (when (derived-mode-p 'vc-dir-mode)
1359 (vc-dir-move-to-goal-column)) 1358 (vc-dir-move-to-goal-column))
@@ -1516,9 +1515,6 @@ buffer is popped up to accept a comment. If INITIAL-CONTENTS is
1516non-nil, then COMMENT is used as the initial contents of the log 1515non-nil, then COMMENT is used as the initial contents of the log
1517entry buffer. 1516entry buffer.
1518 1517
1519If `vc-keep-workfiles' is nil, FILE is deleted afterwards, provided
1520that the version control system supports this mode of operation.
1521
1522Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." 1518Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
1523 (when vc-before-checkin-hook 1519 (when vc-before-checkin-hook
1524 (run-hooks 'vc-before-checkin-hook)) 1520 (run-hooks 'vc-before-checkin-hook))