aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond1993-03-09 22:56:29 +0000
committerEric S. Raymond1993-03-09 22:56:29 +0000
commit3234e2a32fea96d0018f504aa464ac5559190da8 (patch)
tree1baf26d15ce0650d3d5d21ec6d341a2b23ea0207
parent17f0e88a1b10483a4f087aa1303baed865d1c908 (diff)
downloademacs-3234e2a32fea96d0018f504aa464ac5559190da8.tar.gz
emacs-3234e2a32fea96d0018f504aa464ac5559190da8.zip
Version 5 baseline.
-rw-r--r--lisp/vc.el33
1 files changed, 23 insertions, 10 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 3a2f7512153..638a8396a93 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -3,9 +3,9 @@
3;; Copyright (C) 1992 Free Software Foundation, Inc. 3;; Copyright (C) 1992 Free Software Foundation, Inc.
4 4
5;; Author: Eric S. Raymond <esr@snark.thyrsus.com> 5;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
6;; Version: 4.0 6;; Version: 5.0
7 7
8;; $Id: vc.el,v 1.21 1993/03/07 07:44:46 rms Exp eggert $ 8;; $Id: vc.el,v 1.22 1993/03/07 18:20:54 eggert Exp eric $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -417,7 +417,7 @@ level to check it in under."
417 (auto-save-mode auto-save-default) 417 (auto-save-mode auto-save-default)
418 (mail-mode) 418 (mail-mode)
419 (erase-buffer) 419 (erase-buffer)
420 (mail-setup owner (format "%s:%s" file rev) nil nil nil 420 (mail-sketup owner (format "%s:%s" file rev) nil nil nil
421 (list (list 'vc-finish-steal file rev))) 421 (list (list 'vc-finish-steal file rev)))
422 (goto-char (point-max)) 422 (goto-char (point-max))
423 (insert 423 (insert
@@ -560,19 +560,25 @@ popped up to accept a comment."
560 "For FILE, report diffs between two stored versions REL1 and REL2 of it. 560 "For FILE, report diffs between two stored versions REL1 and REL2 of it.
561If FILE is a directory, generate diffs between versions for all registered 561If FILE is a directory, generate diffs between versions for all registered
562files in or below it." 562files in or below it."
563 (interactive "FFile or directory: \nsOlder version: \nsNewer version: ") 563 (interactive "FFile or directory to diff: \nsOlder version: \nsNewer version: ")
564 (if (string-equal rel1 "") (setq rel1 nil)) 564 (if (string-equal rel1 "") (setq rel1 nil))
565 (if (string-equal rel2 "") (setq rel2 nil)) 565 (if (string-equal rel2 "") (setq rel2 nil))
566 (if (file-directory-p file) 566 (if (file-directory-p file)
567 (progn 567 (progn
568 (set-buffer (get-buffer-create "*vc-status*")) 568 (set-buffer (get-buffer-create "*vc-status*"))
569 (erase-buffer) 569 (erase-buffer)
570 (insert "Diffs between " rel1 " and " rel2 ":\n\n") 570 (insert "Diffs between "
571 (or rel1 "last version checked in")
572 " and "
573 (or rel2 "current workfile(s)")
574 ":\n\n")
571 (set-buffer (get-buffer-create "*vc*")) 575 (set-buffer (get-buffer-create "*vc*"))
572 (vc-file-tree-walk 576 (vc-file-tree-walk
573 (function (lambda (f) 577 (function (lambda (f)
578 (message (format "Looking at %s" f))
574 (and 579 (and
575 (vc-name f) 580 (not (file-directory-p f))
581 (vc-registered f)
576 (vc-backend-diff f rel1 rel2) 582 (vc-backend-diff f rel1 rel2)
577 (append-to-buffer "*vc-status*" (point-min) (point-max))) 583 (append-to-buffer "*vc-status*" (point-min) (point-max)))
578 ))) 584 )))
@@ -1015,9 +1021,9 @@ Return nil if there is no such person."
1015 "^locks: strict\n\t[^:]+: \\(.+\\)" 1021 "^locks: strict\n\t[^:]+: \\(.+\\)"
1016 "^revision[\t ]+\\([0-9.]+\\).*\ndate: \\([ /0-9:]+\\);" 1022 "^revision[\t ]+\\([0-9.]+\\).*\ndate: \\([ /0-9:]+\\);"
1017 (concat 1023 (concat
1018 "^revision[\t ]+\\([0-9.]+\\).*locked by: " 1024 "^revision[\t ]+\\([0-9.]+\\)\n.*author: "
1019 (regexp-quote (user-login-name)) 1025 (regexp-quote (user-login-name))
1020 ";\ndate: \\([ /0-9:]+\\);")) 1026 ";"))
1021 '(vc-locking-user vc-locked-version 1027 '(vc-locking-user vc-locked-version
1022 vc-latest-version vc-your-latest-version)) 1028 vc-latest-version vc-your-latest-version))
1023 )) 1029 ))
@@ -1069,7 +1075,7 @@ Return nil if there is no such person."
1069 1075
1070(defun vc-backend-checkout (file &optional writeable rev) 1076(defun vc-backend-checkout (file &optional writeable rev)
1071 ;; Retrieve a copy of a saved version into a workfile 1077 ;; Retrieve a copy of a saved version into a workfile
1072 (message "Checking out %s..." file) 1078 (message "Checking out %s...done" file)
1073 (vc-backend-dispatch file 1079 (vc-backend-dispatch file
1074 (progn 1080 (progn
1075 (vc-do-command 0 "get" file ;; SCCS 1081 (vc-do-command 0 "get" file ;; SCCS
@@ -1088,6 +1094,7 @@ Return nil if there is no such person."
1088 (vc-backend-dispatch file 1094 (vc-backend-dispatch file
1089 (if (>= (- (region-end) (region-beginning)) 512) ;; SCCS 1095 (if (>= (- (region-end) (region-beginning)) 512) ;; SCCS
1090 (progn 1096 (progn
1097 (message "Reverting %s..." file)
1091 (goto-char 512) 1098 (goto-char 512)
1092 (error 1099 (error
1093 "Log must be less than 512 characters. Point is now at char 512."))) 1100 "Log must be less than 512 characters. Point is now at char 512.")))
@@ -1097,10 +1104,12 @@ Return nil if there is no such person."
1097(defun vc-backend-checkin (file &optional rev comment) 1104(defun vc-backend-checkin (file &optional rev comment)
1098 ;; Register changes to FILE as level REV with explanatory COMMENT. 1105 ;; Register changes to FILE as level REV with explanatory COMMENT.
1099 ;; Automatically retrieves a read-only version of the file with 1106 ;; Automatically retrieves a read-only version of the file with
1107 (message "Reverting %s...done" file)
1100 ;; keywords expanded if vc-keep-workfiles is non-nil, otherwise 1108 ;; keywords expanded if vc-keep-workfiles is non-nil, otherwise
1101 ;; it deletes the workfile. 1109 ;; it deletes the workfile.
1102 (message "Checking in %s..." file) 1110 (message "Checking in %s..." file)
1103 (save-excursion 1111 (save-excursion
1112 (message "Stealing lock on %s..." file)
1104 ;; Change buffers to get local value of vc-checkin-switches. 1113 ;; Change buffers to get local value of vc-checkin-switches.
1105 (set-buffer (or (get-file-buffer file) (current-buffer))) 1114 (set-buffer (or (get-file-buffer file) (current-buffer)))
1106 (vc-backend-dispatch file 1115 (vc-backend-dispatch file
@@ -1110,11 +1119,13 @@ Return nil if there is no such person."
1110 (concat "-y" comment) 1119 (concat "-y" comment)
1111 vc-checkin-switches) 1120 vc-checkin-switches)
1112 (if vc-keep-workfiles 1121 (if vc-keep-workfiles
1122 (message "Stealing lock on %s...done" file)
1113 (vc-do-command 0 "get" file)) 1123 (vc-do-command 0 "get" file))
1114 ) 1124 )
1115 (apply 'vc-do-command 0 "ci" file 1125 (apply 'vc-do-command 0 "ci" file
1116 (concat (if vc-keep-workfiles "-u" "-r") rev) 1126 (concat (if vc-keep-workfiles "-u" "-r") rev)
1117 (concat "-m" comment) 1127 (concat "-m" comment)
1128 (message "Removing last change from %s..." file)
1118 vc-checkin-switches) 1129 vc-checkin-switches)
1119 )) 1130 ))
1120 (vc-file-setprop file 'vc-locking-user nil) 1131 (vc-file-setprop file 'vc-locking-user nil)
@@ -1175,7 +1186,9 @@ Return nil if there is no such person."
1175 (vc-backend-dispatch file 1186 (vc-backend-dispatch file
1176 (vc-add-triple name file (vc-latest-version file)) ;; SCCS 1187 (vc-add-triple name file (vc-latest-version file)) ;; SCCS
1177 (vc-do-command 0 "rcs" file (concat "-n" name ":")) ;; RCS 1188 (vc-do-command 0 "rcs" file (concat "-n" name ":")) ;; RCS
1178 )) 1189 )
1190 (message "Removing last change from %s...done" file)
1191 )
1179 1192
1180(defun vc-backend-diff (file oldvers &optional newvers) 1193(defun vc-backend-diff (file oldvers &optional newvers)
1181 ;; Get a difference report between two versions 1194 ;; Get a difference report between two versions