aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Spiegel2001-08-28 17:06:36 +0000
committerAndré Spiegel2001-08-28 17:06:36 +0000
commit99739bbf427ac61d3e2a687b07575d4ef916638e (patch)
treef341d6dc21a113c2668289960721ce49b4b54872
parentbbfc07d3195b13afa78a975091a9dcc1edb92c74 (diff)
downloademacs-99739bbf427ac61d3e2a687b07575d4ef916638e.tar.gz
emacs-99739bbf427ac61d3e2a687b07575d4ef916638e.zip
(vc-*-revert-file): Handle new optional arg CONTENTS-DONE.
-rw-r--r--lisp/vc-cvs.el21
-rw-r--r--lisp/vc-rcs.el4
-rw-r--r--lisp/vc-sccs.el4
3 files changed, 15 insertions, 14 deletions
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index 9c3a6341cfb..4a6ae5275b1 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -5,7 +5,7 @@
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8;; $Id: vc-cvs.el,v 1.22 2001/04/17 05:59:57 eliz Exp $ 8;; $Id: vc-cvs.el,v 1.23 2001/07/04 15:51:18 monnier Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -378,16 +378,17 @@ REV is the revision to check out into WORKFILE."
378 (vc-mode-line file) 378 (vc-mode-line file)
379 (message "Checking out %s...done" filename))))) 379 (message "Checking out %s...done" filename)))))
380 380
381(defun vc-cvs-revert (file) 381(defun vc-cvs-revert (file &optional contents-done)
382 "Revert FILE to the version it was based on." 382 "Revert FILE to the version it was based on."
383 ;; Check out via standard output (caused by the final argument 383 (unless contents-done
384 ;; FILE below), so that no sticky tag is set. 384 ;; Check out via standard output (caused by the final argument
385 (vc-cvs-checkout file nil (vc-workfile-version file) file) 385 ;; FILE below), so that no sticky tag is set.
386 ;; If "cvs edit" was used to make the file writable, 386 (vc-cvs-checkout file nil (vc-workfile-version file) file))
387 ;; call "cvs unedit" now to undo that. 387 (unless (eq (vc-checkout-model file) 'implicit)
388 (if (and (not (eq (vc-cvs-checkout-model file) 'implicit)) 388 (if vc-cvs-use-edit
389 vc-cvs-use-edit) 389 (vc-do-command nil 0 "cvs" file "unedit")
390 (vc-do-command nil 0 "cvs" file "unedit"))) 390 ;; Make the file read-only by switching off all w-bits
391 (set-file-modes file (logand (file-modes file) 3950)))))
391 392
392(defun vc-cvs-merge (file first-version &optional second-version) 393(defun vc-cvs-merge (file first-version &optional second-version)
393 "Merge changes into current working copy of FILE. 394 "Merge changes into current working copy of FILE.
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el
index e33a9c6fdd4..f703b680482 100644
--- a/lisp/vc-rcs.el
+++ b/lisp/vc-rcs.el
@@ -5,7 +5,7 @@
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8;; $Id: vc-rcs.el,v 1.19 2001/03/10 10:50:16 spiegel Exp $ 8;; $Id: vc-rcs.el,v 1.20 2001/07/16 12:22:59 pj Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -455,7 +455,7 @@ whether to remove it."
455 new-version)))))) 455 new-version))))))
456 (message "Checking out %s...done" filename))))) 456 (message "Checking out %s...done" filename)))))
457 457
458(defun vc-rcs-revert (file) 458(defun vc-rcs-revert (file &optional contents-done)
459 "Revert FILE to the version it was based on." 459 "Revert FILE to the version it was based on."
460 (vc-do-command nil 0 "co" (vc-name file) "-f" 460 (vc-do-command nil 0 "co" (vc-name file) "-f"
461 (concat "-u" (vc-workfile-version file)))) 461 (concat "-u" (vc-workfile-version file))))
diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el
index 49692cd0727..f3b922d143e 100644
--- a/lisp/vc-sccs.el
+++ b/lisp/vc-sccs.el
@@ -5,7 +5,7 @@
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8;; $Id: vc-sccs.el,v 1.11 2001/03/29 11:49:22 spiegel Exp $ 8;; $Id: vc-sccs.el,v 1.12 2001/07/16 12:22:59 pj Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -261,7 +261,7 @@ locked. REV is the revision to check out into WORKFILE."
261 switches))))) 261 switches)))))
262 (message "Checking out %s...done" filename))) 262 (message "Checking out %s...done" filename)))
263 263
264(defun vc-sccs-revert (file) 264(defun vc-sccs-revert (file &optional contents-done)
265 "Revert FILE to the version it was based on." 265 "Revert FILE to the version it was based on."
266 (vc-do-command nil 0 "unget" (vc-name file)) 266 (vc-do-command nil 0 "unget" (vc-name file))
267 (vc-do-command nil 0 "get" (vc-name file)) 267 (vc-do-command nil 0 "get" (vc-name file))