emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 8bc7ac5: Righteous featurectomy of vc-keep-workfile


From: Eric S. Raymond
Subject: [Emacs-diffs] master 8bc7ac5: Righteous featurectomy of vc-keep-workfiles - always do it.
Date: Wed, 10 Dec 2014 17:34:46 +0000

branch: master
commit 8bc7ac5c25f42b745cc90131a9a456f763582dbf
Author: Eric S. Raymond <address@hidden>
Commit: Eric S. Raymond <address@hidden>

    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.
---
 lisp/ChangeLog           |    7 +++++++
 lisp/vc/vc-dispatcher.el |    2 +-
 lisp/vc/vc-hooks.el      |    7 -------
 lisp/vc/vc-rcs.el        |    9 ++++-----
 lisp/vc/vc-sccs.el       |   12 ++++--------
 lisp/vc/vc.el            |    8 ++------
 6 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 53c03e0..d5f2254 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2014-12-10  Eric S. Raymond  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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 d2125d5..e1bf05c8 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -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))
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 9a4fe16..0ffca56 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -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))
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 20b292f..9bb9af1 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."
 
 (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)
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index c7144c0..a8e122d 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -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
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 6e0e2c6..3ea4809 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:
   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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]