summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@twinsun.com>1993-07-22 10:57:46 +0000
committerPaul Eggert <eggert@twinsun.com>1993-07-22 10:57:46 +0000
commitd76b8d38bcd82d5f5fdea9d7b0db1749ef7dff5a (patch)
treee1121ac5c6272a40af79a57ba4f611bf4c147f3b
parentc08c95c7afc653758f005970bb8eb4add7454885 (diff)
downloademacs-d76b8d38bcd82d5f5fdea9d7b0db1749ef7dff5a.tar.gz
> (vc-backend-revert): Use `co -f' instead of deleting the
working file ourselves; that way, if `co' fails, we won't have deleted the working file. (vc-backend-steal): Don't delete the working file. Use `rcs -u -l', not `rcs -u ; rcs -l'; it's faster. Use vc-backend-dispatch -- the old code couldn't have possibly worked.
-rw-r--r--lisp/vc.el19
1 files changed, 7 insertions, 12 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 9265c60bcbd..fe4d6f3cbde 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1485,9 +1485,7 @@ Return nil if there is no such person."
(progn ;; SCCS
(vc-do-command 0 "unget" file nil)
(vc-do-command 0 "get" file nil))
- (progn
- (delete-file file) ;; RCS
- (vc-do-command 0 "co" file "-u")))
+ (vc-do-command 0 "co" file "-f" "-u")) ;; RCS. This deletes the work file.
(vc-file-setprop file 'vc-locking-user nil)
(message "Reverting %s...done" file)
)
@@ -1495,15 +1493,12 @@ Return nil if there is no such person."
(defun vc-backend-steal (file &optional rev)
;; Steal the lock on the current workfile. Needs RCS 5.6.2 or later for -M.
(message "Stealing lock on %s..." file)
- (progn
- (vc-do-command 0 "unget" file "-n" (if rev (concat "-r" rev)))
- (vc-do-command 0 "get" file "-g" (if rev (concat "-r" rev)))
- )
- (progn
- (vc-do-command 0 "rcs" "-M" (concat "-u" rev) file)
- (delete-file file)
- (vc-do-command 0 "rcs" (concat "-l" rev) file)
- )
+ (vc-backend-dispatch
+ (progn
+ (vc-do-command 0 "unget" file "-n" (if rev (concat "-r" rev)))
+ (vc-do-command 0 "get" file "-g" (if rev (concat "-r" rev)))
+ )
+ (vc-do-command 0 "rcs" "-M" (concat "-u" rev) (concat "-l" rev) file))
(vc-file-setprop file 'vc-locking-user (user-login-name))
(message "Stealing lock on %s...done" file)
)