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.
This commit is contained in:
parent
bdc373bf45
commit
8bc7ac5c25
6 changed files with 18 additions and 27 deletions
|
@ -1,3 +1,10 @@
|
|||
2014-12-10 Eric S. Raymond <esr@snark.thyrsus.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2014-12-10 Rasmus Pank Roulund <emacs@pank.eu>
|
||||
|
||||
* net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing
|
||||
|
|
|
@ -702,7 +702,7 @@ the buffer contents as a comment."
|
|||
;; Now make sure we see the expanded headers
|
||||
(when log-fileset
|
||||
(mapc
|
||||
(lambda (file) (vc-resynch-buffer file vc-keep-workfiles t))
|
||||
(lambda (file) (vc-resynch-buffer file t t))
|
||||
log-fileset))
|
||||
(when (vc-dispatcher-browsing)
|
||||
(vc-dir-move-to-goal-column))
|
||||
|
|
|
@ -164,13 +164,6 @@ Otherwise, not displayed."
|
|||
:type 'boolean
|
||||
:group 'vc)
|
||||
|
||||
(defcustom vc-keep-workfiles t
|
||||
"Whether to keep work files on disk after commits, on a locking VCS.
|
||||
This variable has no effect on modern merging-based version
|
||||
control systems."
|
||||
:type 'boolean
|
||||
:group 'vc)
|
||||
|
||||
;;; This is handled specially now.
|
||||
;; Tell Emacs about this new kind of minor mode
|
||||
;; (add-to-list 'minor-mode-alist '(vc-mode vc-mode))
|
||||
|
|
|
@ -226,12 +226,10 @@ When VERSION is given, perform check for that version."
|
|||
|
||||
(defun vc-rcs-register (files &optional comment)
|
||||
"Register FILES into the RCS version-control system.
|
||||
Automatically retrieve a read-only version of the file with keywords expanded.
|
||||
COMMENT can be used to provide an initial description for each FILES.
|
||||
Passes either `vc-rcs-register-switches' or `vc-register-switches'
|
||||
to the RCS command.
|
||||
|
||||
Automatically retrieve a read-only version of the file with keywords
|
||||
expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
|
||||
to the RCS command."
|
||||
(let (subdir name)
|
||||
(dolist (file files)
|
||||
(and (not (file-exists-p
|
||||
|
@ -244,6 +242,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
|
|||
(apply #'vc-do-command "*vc*" 0 "ci" file
|
||||
;; if available, use the secure registering option
|
||||
(and (vc-rcs-release-p "5.6.4") "-i")
|
||||
"-u"
|
||||
(and comment (concat "-t-" comment))
|
||||
(vc-switches 'RCS 'register))
|
||||
;; parse output to find master file name and workfile version
|
||||
|
@ -328,7 +327,7 @@ whether to remove it."
|
|||
(apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file)
|
||||
;; if available, use the secure check-in option
|
||||
(and (vc-rcs-release-p "5.6.4") "-j")
|
||||
(concat (if vc-keep-workfiles "-u" "-r") rev)
|
||||
(concat "-u" rev)
|
||||
(concat "-m" comment)
|
||||
switches)
|
||||
(vc-file-setprop file 'vc-working-revision nil)
|
||||
|
|
|
@ -195,12 +195,10 @@ Optional string REV is a revision."
|
|||
|
||||
(defun vc-sccs-register (files &optional comment)
|
||||
"Register FILES into the SCCS version-control system.
|
||||
Automatically retrieve a read-only version of the files with keywords expanded.
|
||||
COMMENT can be used to provide an initial description of FILES.
|
||||
Passes either `vc-sccs-register-switches' or `vc-register-switches'
|
||||
to the SCCS command.
|
||||
|
||||
Automatically retrieve a read-only version of the files with keywords
|
||||
expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
|
||||
to the SCCS command."
|
||||
(dolist (file files)
|
||||
(let* ((dirname (or (file-name-directory file) ""))
|
||||
(basename (file-name-nondirectory file))
|
||||
|
@ -214,8 +212,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
|
|||
(and comment (concat "-y" comment))
|
||||
(vc-switches 'SCCS 'register)))
|
||||
(delete-file file)
|
||||
(if vc-keep-workfiles
|
||||
(vc-sccs-do-command nil 0 "get" (vc-master-name file))))))
|
||||
(vc-sccs-do-command nil 0 "get" (vc-master-name file)))))
|
||||
|
||||
(defun vc-sccs-responsible-p (file)
|
||||
"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."
|
|||
(apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file)
|
||||
(concat "-y" comment)
|
||||
(vc-switches 'SCCS 'checkin))
|
||||
(if vc-keep-workfiles
|
||||
(vc-sccs-do-command nil 0 "get" (vc-master-name file)))))
|
||||
(vc-sccs-do-command nil 0 "get" (vc-master-name file))))
|
||||
|
||||
(defun vc-sccs-find-revision (file rev buffer)
|
||||
(apply 'vc-sccs-do-command
|
||||
|
|
|
@ -1111,8 +1111,7 @@ For old-style locking-based version control systems, like RCS:
|
|||
If every file is registered and unlocked, check out (lock)
|
||||
the file(s) for editing.
|
||||
If every file is locked by you and has changes, pop up a
|
||||
*vc-log* buffer to check in the changes. If the variable
|
||||
`vc-keep-workfiles' is non-nil (the default), leave a
|
||||
*vc-log* buffer to check in the changes. Leave a
|
||||
read-only copy of each changed file after checking in.
|
||||
If every file is locked by you and unchanged, unlock them.
|
||||
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."
|
|||
;; (make-local-variable 'backup-inhibited)
|
||||
;; (setq backup-inhibited t))
|
||||
|
||||
(vc-resynch-buffer file vc-keep-workfiles t))
|
||||
(vc-resynch-buffer file t t))
|
||||
files)
|
||||
(when (derived-mode-p 'vc-dir-mode)
|
||||
(vc-dir-move-to-goal-column))
|
||||
|
@ -1516,9 +1515,6 @@ buffer is popped up to accept a comment. If INITIAL-CONTENTS is
|
|||
non-nil, then COMMENT is used as the initial contents of the log
|
||||
entry buffer.
|
||||
|
||||
If `vc-keep-workfiles' is nil, FILE is deleted afterwards, provided
|
||||
that the version control system supports this mode of operation.
|
||||
|
||||
Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
|
||||
(when vc-before-checkin-hook
|
||||
(run-hooks 'vc-before-checkin-hook))
|
||||
|
|
Loading…
Add table
Reference in a new issue