annotate lisp/obsolete/vc-mcvs.el @ 103149:a8c9fae0b19d

* hooks.texi (Standard Hooks): Add abbrev-expand-functions. Remove obsoleted pre-abbrev-expand-hook. * locals.texi (Standard Buffer-Local Variables): Consolidate table entries. * internals.texi (Window Internals): Synch field names to window.h. (Process Internals): Synch field names to process.h.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 04 May 2009 23:25:38 +0000
parents a9dc0e7c3f2b
children f8ba8d6fd250
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
100306
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
1 ;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
2
100908
a9dc0e7c3f2b Add 2009 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100306
diff changeset
3 ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
100306
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
4 ;; Free Software Foundation, Inc.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
5
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
6 ;; Author: FSF (see vc.el for full credits)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
7 ;; Maintainer: None
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
8
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
10
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
14 ;; (at your option) any later version.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
15
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
20
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
23
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
24 ;;; Commentary:
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
25
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
26 ;; ********** READ THIS! **********
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
27 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
28 ;; This file apparently does not work with the new (as of Emacs 23)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
29 ;; VC code. Use at your own risk. Please contact emacs-devel if you
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
30 ;; can maintain this file and update it to work correctly.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
31 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
32 ;; ********** READ THIS! **********
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
33
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
34 ;; This file has been obsolete and unsupported since Emacs 23.1.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
35
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
36
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
37 ;; The home page of the Meta-CVS version control system is at
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
38 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
39 ;; http://users.footprints.net/~kaz/mcvs.html
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
40 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
41 ;; This is derived from vc-cvs.el as follows:
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
42 ;; - cp vc-cvs.el vc-mcvs.el
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
43 ;; - Replace CVS/ with MCVS/CVS/
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
44 ;; - Replace 'CVS with 'MCVS
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
45 ;; - Replace -cvs- with -mcvs-
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
46 ;; - Replace most of the rest of CVS to Meta-CVS
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
47 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
48 ;; Then of course started the hacking. Only a small part of the code
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
49 ;; has been touched and not much more than that was tested, so if
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
50 ;; you bump into a bug, don't be surprised: just report it to me.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
51 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
52 ;; What has been partly tested:
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
53 ;; - C-x v v to start editing a file that was checked out with CVSREAD on.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
54 ;; - C-x v v to commit a file
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
55 ;; - C-x v =
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
56 ;; - C-x v l
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
57 ;; - C-x v i
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
58 ;; - C-x v g
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
59 ;; - M-x vc-rename-file RET
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
60
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
61 ;;; Bugs:
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
62
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
63 ;; - Retrieving tags doesn't filter `cvs update' output and thus
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
64 ;; parses bogus filenames. Don't know if it harms.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
65
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
66 ;;; Code:
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
67
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
68 (eval-when-compile (require 'vc))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
69 (require 'vc-cvs)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
70
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
71 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
72 ;;; Customization options
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
73 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
74
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
75 (defcustom vc-mcvs-global-switches nil
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
76 "Global switches to pass to any Meta-CVS command."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
77 :type '(choice (const :tag "None" nil)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
78 (string :tag "Argument String")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
79 (repeat :tag "Argument List" :value ("") string))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
80 :version "22.1"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
81 :group 'vc)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
82
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
83 (defcustom vc-mcvs-register-switches nil
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
84 "Switches for registering a file into Meta-CVS.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
85 A string or list of strings passed to the checkin program by
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
86 \\[vc-register]. If nil, use the value of `vc-register-switches'.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
87 If t, use no switches."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
88 :type '(choice (const :tag "Unspecified" nil)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
89 (const :tag "None" t)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
90 (string :tag "Argument String")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
91 (repeat :tag "Argument List" :value ("") string))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
92 :version "22.1"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
93 :group 'vc)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
94
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
95 (defcustom vc-mcvs-diff-switches nil
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
96 "String or list of strings specifying switches for Meta-CVS diff under VC.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
97 If nil, use the value of `vc-diff-switches'. If t, use no switches."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
98 :type '(choice (const :tag "Unspecified" nil)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
99 (const :tag "None" t)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
100 (string :tag "Argument String")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
101 (repeat :tag "Argument List" :value ("") string))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
102 :version "22.1"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
103 :group 'vc)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
104
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
105 (defcustom vc-mcvs-header (or (cdr (assoc 'MCVS vc-header-alist))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
106 vc-cvs-header)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
107 "Header keywords to be inserted by `vc-insert-headers'."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
108 :version "22.1"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
109 :type '(repeat string)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
110 :group 'vc)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
111
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
112 (defcustom vc-mcvs-use-edit vc-cvs-use-edit
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
113 "Non-nil means to use `cvs edit' to \"check out\" a file.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
114 This is only meaningful if you don't use the implicit checkout model
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
115 \(i.e. if you have $CVSREAD set)."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
116 :type 'boolean
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
117 :version "22.1"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
118 :group 'vc)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
119
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
120 ;;; Properties of the backend
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
121
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
122 (defalias 'vc-mcvs-revision-granularity 'vc-cvs-revision-granularity)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
123 (defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
124
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
125 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
126 ;;; State-querying functions
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
127 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
128
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
129 ;;;###autoload (defun vc-mcvs-registered (file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
130 ;;;###autoload (if (vc-find-root file "MCVS/CVS")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
131 ;;;###autoload (progn
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
132 ;;;###autoload (load "vc-mcvs")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
133 ;;;###autoload (vc-mcvs-registered file))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
134
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
135 (defun vc-mcvs-root (file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
136 "Return the root directory of a Meta-CVS project, if any."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
137 (or (vc-file-getprop file 'mcvs-root)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
138 (vc-file-setprop file 'mcvs-root (vc-find-root file "MCVS/CVS"))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
139
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
140 (defun vc-mcvs-read (file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
141 (if (file-readable-p file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
142 (with-temp-buffer
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
143 (insert-file-contents file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
144 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
145 (read (current-buffer)))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
146
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
147 (defun vc-mcvs-map-file (dir file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
148 (let ((map (vc-mcvs-read (expand-file-name "MCVS/MAP" dir)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
149 inode)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
150 (dolist (x map inode)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
151 (if (equal (nth 2 x) file) (setq inode (nth 1 x))))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
152
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
153 (defun vc-mcvs-registered (file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
154 (let (root inode cvsfile)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
155 (when (and (setq root (vc-mcvs-root file))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
156 (setq inode (vc-mcvs-map-file
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
157 root (file-relative-name file root))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
158 (vc-file-setprop file 'mcvs-inode inode)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
159 ;; Avoid calling `mcvs diff' in vc-workfile-unchanged-p.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
160 (vc-file-setprop file 'vc-checkout-time
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
161 (if (vc-cvs-registered
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
162 (setq cvsfile (expand-file-name inode root)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
163 (vc-file-getprop cvsfile 'vc-checkout-time)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
164 ;; The file might not be registered yet because
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
165 ;; of lazy-adding.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
166 0))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
167 t)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
168
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
169 (defun vc-mcvs-state (file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
170 ;; This would assume the Meta-CVS sandbox is synchronized.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
171 ;; (vc-mcvs-cvs state file))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
172 "Meta-CVS-specific version of `vc-state'."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
173 (if (vc-stay-local-p file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
174 (let ((state (vc-file-getprop file 'vc-state)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
175 ;; If we should stay local, use the heuristic but only if
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
176 ;; we don't have a more precise state already available.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
177 (if (memq state '(up-to-date edited))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
178 (vc-mcvs-state-heuristic file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
179 state))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
180 (with-temp-buffer
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
181 (setq default-directory (vc-mcvs-root file))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
182 (vc-mcvs-command t 0 file "status")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
183 (vc-cvs-parse-status t))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
184
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
185
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
186 (defalias 'vc-mcvs-state-heuristic 'vc-cvs-state-heuristic)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
187
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
188 (defun vc-mcvs-working-revision (file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
189 (vc-cvs-working-revision
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
190 (expand-file-name (vc-file-getprop file 'mcvs-inode)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
191 (vc-file-getprop file 'mcvs-root))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
192
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
193 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
194 ;;; State-changing functions
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
195 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
196
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
197 (defun vc-mcvs-register (files &optional rev comment)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
198 "Register FILES into the Meta-CVS version-control system.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
199 COMMENT can be used to provide an initial description of FILE.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
200 Passes either `vc-mcvs-register-switches' or `vc-register-switches'
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
201 to the Meta-CVS command."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
202 ;; FIXME: multiple-file case should be made to work.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
203 (if (> (length files) 1) (error "Registering filesets is not yet supported."))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
204 (let* ((file (car files))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
205 (filename (file-name-nondirectory file))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
206 (extpos (string-match "\\." filename))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
207 (ext (if extpos (substring filename (1+ extpos))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
208 (root (vc-mcvs-root file))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
209 (types-file (expand-file-name "MCVS/TYPES" root))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
210 (map-file (expand-file-name "MCVS/MAP" root))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
211 (types (vc-mcvs-read types-file)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
212 ;; Make sure meta files like MCVS/MAP are not read-only (happens with
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
213 ;; CVSREAD) since Meta-CVS doesn't pay attention to it at all and goes
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
214 ;; belly-up.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
215 (unless (file-writable-p map-file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
216 (vc-checkout map-file t))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
217 (unless (or (file-writable-p types-file) (not (file-exists-p types-file)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
218 (vc-checkout types-file t))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
219 ;; Make sure the `mcvs add' will not fire up the CVSEDITOR
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
220 ;; to add a rule for the given file's extension.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
221 (when (and ext (not (assoc ext types)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
222 (let ((type (completing-read "Type to use (default): "
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
223 '("default" "name-only" "keep-old"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
224 "binary" "value-only")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
225 nil t nil nil "default")))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
226 (push (list ext (make-symbol (upcase (concat ":" type)))) types)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
227 (setq types (sort types (lambda (x y) (string< (car x) (car y)))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
228 (with-current-buffer (find-file-noselect types-file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
229 (erase-buffer)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
230 (pp types (current-buffer))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
231 (save-buffer)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
232 (unless (get-buffer-window (current-buffer) t)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
233 (kill-buffer (current-buffer))))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
234 ;; Now do the ADD.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
235 (prog1 (apply 'vc-mcvs-command nil 0 file
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
236 "add"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
237 (and comment (string-match "[^\t\n ]" comment)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
238 (concat "-m" comment))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
239 (vc-switches 'MCVS 'register))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
240 ;; I'm not sure exactly why, but if we don't setup the inode and root
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
241 ;; prop of the file, things break later on in vc-mode-line that
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
242 ;; ends up calling vc-mcvs-working-revision.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
243 ;; We also need to set vc-checkout-time so that vc-workfile-unchanged-p
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
244 ;; doesn't try to call `mcvs diff' on the file.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
245 (vc-mcvs-registered file))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
246
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
247 (defalias 'vc-mcvs-responsible-p 'vc-mcvs-root
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
248 "Return non-nil if CVS thinks it is responsible for FILE.")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
249
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
250 (defalias 'vc-cvs-could-register 'vc-cvs-responsible-p
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
251 "Return non-nil if FILE could be registered in Meta-CVS.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
252 This is only possible if Meta-CVS is responsible for FILE's directory.")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
253
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
254 (defun vc-mcvs-checkin (files rev comment)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
255 "Meta-CVS-specific version of `vc-backend-checkin'."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
256 (unless (or (not rev) (vc-mcvs-valid-revision-number-p rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
257 (if (not (vc-mcvs-valid-symbolic-tag-name-p rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
258 (error "%s is not a valid symbolic tag name" rev)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
259 ;; If the input revision is a valid symbolic tag name, we create it
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
260 ;; as a branch, commit and switch to it.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
261 ;; This file-specific form of branching is deprecated.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
262 ;; We can't use `mcvs branch' and `mcvs switch' because they cannot
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
263 ;; be applied just to this one file.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
264 (apply 'vc-mcvs-command nil 0 files "tag" "-b" (list rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
265 (apply 'vc-mcvs-command nil 0 files "update" "-r" (list rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
266 (mapc (lambda (file) (vc-file-setprop file 'vc-mcvs-sticky-tag rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
267 files)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
268 (setq rev nil)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
269 ;; This commit might cvs-commit several files (e.g. MAP and TYPES)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
270 ;; so using numbered revs here is dangerous and somewhat meaningless.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
271 (when rev (error "Cannot commit to a specific revision number"))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
272 (let ((status (apply 'vc-mcvs-command nil 1 files
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
273 "ci" "-m" comment
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
274 (vc-switches 'MCVS 'checkin))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
275 (set-buffer "*vc*")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
276 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
277 (when (not (zerop status))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
278 ;; Check checkin problem.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
279 (cond
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
280 ((re-search-forward "Up-to-date check failed" nil t)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
281 (mapc (lambda (file) (vc-file-setprop file 'vc-state 'needs-merge))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
282 files)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
283 (error "%s" (substitute-command-keys
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
284 (concat "Up-to-date check failed: "
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
285 "type \\[vc-next-action] to merge in changes"))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
286 (t
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
287 (pop-to-buffer (current-buffer))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
288 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
289 (shrink-window-if-larger-than-buffer)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
290 (error "Check-in failed"))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
291 ;; Single-file commit? Then update the revision by parsing the buffer.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
292 ;; Otherwise we can't necessarily tell what goes with what; clear
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
293 ;; its properties so they have to be refetched.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
294 (if (= (length files) 1)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
295 (vc-file-setprop
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
296 (car files) 'vc-working-revision
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
297 (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
298 (mapc (lambda (file) (vc-file-clearprops file)) files))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
299 ;; Anyway, forget the checkout model of the file, because we might have
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
300 ;; guessed wrong when we found the file. After commit, we can
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
301 ;; tell it from the permissions of the file (see
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
302 ;; vc-mcvs-checkout-model).
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
303 (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
304 files)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
305
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
306 ;; if this was an explicit check-in (does not include creation of
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
307 ;; a branch), remove the sticky tag.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
308 (if (and rev (not (vc-mcvs-valid-symbolic-tag-name-p rev)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
309 (vc-mcvs-command nil 0 files "update" "-A"))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
310
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
311 (defun vc-mcvs-find-revision (file rev buffer)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
312 (apply 'vc-mcvs-command
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
313 buffer 0 file
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
314 "-Q" ; suppress diagnostic output
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
315 "update"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
316 (and rev (not (string= rev ""))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
317 (concat "-r" rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
318 "-p"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
319 (vc-switches 'MCVS 'checkout)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
320
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
321 (defun vc-mcvs-checkout (file &optional editable rev)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
322 (message "Checking out %s..." file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
323 (with-current-buffer (or (get-file-buffer file) (current-buffer))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
324 (vc-mcvs-update file editable rev (vc-switches 'MCVS 'checkout)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
325 (vc-mode-line file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
326 (message "Checking out %s...done" file))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
327
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
328 (defun vc-mcvs-update (file editable rev switches)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
329 (if (and (file-exists-p file) (not rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
330 ;; If no revision was specified, just make the file writable
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
331 ;; if necessary (using `cvs-edit' if requested).
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
332 (and editable (not (eq (vc-mcvs-checkout-model (list file)) 'implicit))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
333 (if vc-mcvs-use-edit
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
334 (vc-mcvs-command nil 0 file "edit")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
335 (set-file-modes file (logior (file-modes file) 128))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
336 (if (equal file buffer-file-name) (toggle-read-only -1))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
337 ;; Check out a particular revision (or recreate the file).
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
338 (vc-file-setprop file 'vc-working-revision nil)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
339 (apply 'vc-mcvs-command nil 0 file
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
340 (if editable "-w")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
341 "update"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
342 ;; default for verbose checkout: clear the sticky tag so
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
343 ;; that the actual update will get the head of the trunk
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
344 (if (or (not rev) (string= rev ""))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
345 "-A"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
346 (concat "-r" rev))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
347 switches)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
348
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
349 (defun vc-mcvs-rename-file (old new)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
350 (vc-mcvs-command nil 0 new "move" (file-relative-name old)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
351
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
352 (defun vc-mcvs-revert (file &optional contents-done)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
353 "Revert FILE to the working revision it was based on."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
354 (vc-default-revert 'MCVS file contents-done)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
355 (unless (eq (vc-mcvs-checkout-model (list file)) 'implicit)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
356 (if vc-mcvs-use-edit
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
357 (vc-mcvs-command nil 0 file "unedit")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
358 ;; Make the file read-only by switching off all w-bits
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
359 (set-file-modes file (logand (file-modes file) 3950)))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
360
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
361 (defun vc-mcvs-merge (file first-revision &optional second-revision)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
362 "Merge changes into current working copy of FILE.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
363 The changes are between FIRST-REVISION and SECOND-REVISION."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
364 (vc-mcvs-command nil 0 file
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
365 "update" "-kk"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
366 (concat "-j" first-revision)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
367 (concat "-j" second-revision))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
368 (vc-file-setprop file 'vc-state 'edited)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
369 (with-current-buffer (get-buffer "*vc*")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
370 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
371 (if (re-search-forward "conflicts during merge" nil t)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
372 1 ; signal error
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
373 0))) ; signal success
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
374
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
375 (defun vc-mcvs-merge-news (file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
376 "Merge in any new changes made to FILE."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
377 (message "Merging changes into %s..." file)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
378 ;; (vc-file-setprop file 'vc-working-revision nil)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
379 (vc-file-setprop file 'vc-checkout-time 0)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
380 (vc-mcvs-command nil 0 file "update")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
381 ;; Analyze the merge result reported by Meta-CVS, and set
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
382 ;; file properties accordingly.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
383 (with-current-buffer (get-buffer "*vc*")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
384 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
385 ;; get new working revision
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
386 (if (re-search-forward
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
387 "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
388 (vc-file-setprop file 'vc-working-revision (match-string 1))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
389 (vc-file-setprop file 'vc-working-revision nil))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
390 ;; get file status
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
391 (prog1
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
392 (if (eq (buffer-size) 0)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
393 0 ;; there were no news; indicate success
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
394 (if (re-search-forward
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
395 (concat "^\\([CMUP] \\)?"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
396 ".*"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
397 "\\( already contains the differences between \\)?")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
398 nil t)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
399 (cond
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
400 ;; Merge successful, we are in sync with repository now
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
401 ((or (match-string 2)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
402 (string= (match-string 1) "U ")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
403 (string= (match-string 1) "P "))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
404 (vc-file-setprop file 'vc-state 'up-to-date)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
405 (vc-file-setprop file 'vc-checkout-time
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
406 (nth 5 (file-attributes file)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
407 0);; indicate success to the caller
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
408 ;; Merge successful, but our own changes are still in the file
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
409 ((string= (match-string 1) "M ")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
410 (vc-file-setprop file 'vc-state 'edited)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
411 0);; indicate success to the caller
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
412 ;; Conflicts detected!
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
413 (t
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
414 (vc-file-setprop file 'vc-state 'edited)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
415 1);; signal the error to the caller
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
416 )
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
417 (pop-to-buffer "*vc*")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
418 (error "Couldn't analyze mcvs update result")))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
419 (message "Merging changes into %s...done" file))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
420
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
421 (defun vc-mcvs-modify-change-comment (files rev comment)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
422 "Modify the change comments for FILES on a specified REV.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
423 Will fail unless you have administrative privileges on the repo."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
424 (vc-mcvs-command nil 0 files "rcs" (concat "-m" comment ":" rev)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
425
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
426
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
427 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
428 ;;; History functions
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
429 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
430
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
431 (defun vc-mcvs-print-log (files &optional buffer)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
432 "Get change log associated with FILES."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
433 (let ((default-directory (vc-mcvs-root (car files))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
434 ;; Run the command from the root dir so that `mcvs filt' returns
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
435 ;; valid relative names.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
436 (vc-mcvs-command
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
437 buffer
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
438 (if (vc-stay-local-p files) 'async 0)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
439 files "log")))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
440
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
441 (defun vc-mcvs-diff (files &optional oldvers newvers buffer)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
442 "Get a difference report using Meta-CVS between two revisions of FILES."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
443 (let* ((async (and (not vc-disable-async-diff)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
444 (vc-stay-local-p files)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
445 ;; Run the command from the root dir so that `mcvs filt' returns
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
446 ;; valid relative names.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
447 (default-directory (vc-mcvs-root (car files)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
448 (status
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
449 (apply 'vc-mcvs-command (or buffer "*vc-diff*")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
450 (if async 'async 1)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
451 files "diff"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
452 (and oldvers (concat "-r" oldvers))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
453 (and newvers (concat "-r" newvers))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
454 (vc-switches 'MCVS 'diff))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
455 (if async 1 status))) ; async diff, pessimistic assumption.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
456
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
457 (defun vc-mcvs-annotate-command (file buffer &optional revision)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
458 "Execute \"mcvs annotate\" on FILE, inserting the contents in BUFFER.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
459 Optional arg REVISION is a revision to annotate from."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
460 (vc-mcvs-command
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
461 buffer
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
462 (if (vc-stay-local-p file) 'async 0)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
463 file "annotate" (if revision (concat "-r" revision)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
464 (with-current-buffer buffer
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
465 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
466 (re-search-forward "^[0-9]")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
467 (delete-region (point-min) (1- (point)))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
468
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
469 (defalias 'vc-mcvs-annotate-current-time 'vc-cvs-annotate-current-time)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
470 (defalias 'vc-mcvs-annotate-time 'vc-cvs-annotate-time)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
471
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
472 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
473 ;;; Tag system
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
474 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
475
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
476 (defun vc-mcvs-create-tag (dir name branchp)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
477 "Assign to DIR's current revision a given NAME.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
478 If BRANCHP is non-nil, the name is created as a branch (and the current
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
479 workspace is immediately moved to that new branch)."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
480 (if (not branchp)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
481 (vc-mcvs-command nil 0 dir "tag" "-c" name)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
482 (vc-mcvs-command nil 0 dir "branch" name)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
483 (vc-mcvs-command nil 0 dir "switch" name)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
484
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
485 (defun vc-mcvs-retrieve-tag (dir name update)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
486 "Retrieve a tag at and below DIR.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
487 NAME is the name of the tag; if it is empty, do a `cvs update'.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
488 If UPDATE is non-nil, then update (resynch) any affected buffers."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
489 (with-current-buffer (get-buffer-create "*vc*")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
490 (let ((default-directory dir)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
491 (sticky-tag))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
492 (erase-buffer)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
493 (if (or (not name) (string= name ""))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
494 (vc-mcvs-command t 0 nil "update")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
495 (vc-mcvs-command t 0 nil "update" "-r" name)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
496 (setq sticky-tag name))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
497 (when update
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
498 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
499 (while (not (eobp))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
500 (if (looking-at "\\([CMUP]\\) \\(.*\\)")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
501 (let* ((file (expand-file-name (match-string 2) dir))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
502 (state (match-string 1))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
503 (buffer (find-buffer-visiting file)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
504 (when buffer
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
505 (cond
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
506 ((or (string= state "U")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
507 (string= state "P"))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
508 (vc-file-setprop file 'vc-state 'up-to-date)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
509 (vc-file-setprop file 'vc-working-revision nil)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
510 (vc-file-setprop file 'vc-checkout-time
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
511 (nth 5 (file-attributes file))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
512 ((or (string= state "M")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
513 (string= state "C"))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
514 (vc-file-setprop file 'vc-state 'edited)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
515 (vc-file-setprop file 'vc-working-revision nil)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
516 (vc-file-setprop file 'vc-checkout-time 0)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
517 (vc-file-setprop file 'vc-mcvs-sticky-tag sticky-tag)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
518 (vc-resynch-buffer file t t))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
519 (forward-line 1))))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
520
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
521
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
522 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
523 ;;; Miscellaneous
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
524 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
525
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
526 (defalias 'vc-mcvs-make-version-backups-p 'vc-stay-local-p
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
527 "Return non-nil if version backups should be made for FILE.")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
528 (defalias 'vc-mcvs-check-headers 'vc-cvs-check-headers)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
529
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
530
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
531 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
532 ;;; Internal functions
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
533 ;;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
534
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
535 (defun vc-mcvs-command (buffer okstatus file &rest flags)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
536 "A wrapper around `vc-do-command' for use in vc-mcvs.el.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
537 The difference to vc-do-command is that this function always invokes `mcvs',
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
538 and that it passes `vc-mcvs-global-switches' to it before FLAGS."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
539 (let ((args (append '("--error-terminate")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
540 (if (stringp vc-mcvs-global-switches)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
541 (cons vc-mcvs-global-switches flags)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
542 (append vc-mcvs-global-switches flags)))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
543 (if (not (member (car flags) '("diff" "log" "status")))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
544 ;; No need to filter: do it the easy way.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
545 (apply 'vc-do-command (or buffer "*vc*") okstatus "mcvs" file args)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
546 ;; We need to filter the output.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
547 ;; The output of the filter uses filenames relative to the root,
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
548 ;; so we need to change the default-directory.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
549 ;; (assert (equal default-directory (vc-mcvs-root file)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
550 (vc-do-command
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
551 (or buffer "*vc*") okstatus "sh" nil "-c"
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
552 (concat "mcvs "
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
553 (mapconcat
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
554 'shell-quote-argument
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
555 (append (remq nil args)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
556 (if file (list (file-relative-name file))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
557 " ")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
558 " | mcvs filt")))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
559
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
560 (defun vc-mcvs-repository-hostname (dirname)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
561 (vc-cvs-repository-hostname (vc-mcvs-root dirname)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
562
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
563 (defun vc-mcvs-dir-state-heuristic (dir)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
564 "Find the Meta-CVS state of all files in DIR, using only local information."
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
565 (with-temp-buffer
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
566 (vc-cvs-get-entries dir)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
567 (goto-char (point-min))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
568 (while (not (eobp))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
569 ;; Meta-MCVS-removed files are not taken under VC control.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
570 (when (looking-at "/\\([^/]*\\)/[^/-]")
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
571 (let ((file (expand-file-name (match-string 1) dir)))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
572 (unless (vc-file-getprop file 'vc-state)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
573 (vc-cvs-parse-entry file t))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
574 (forward-line 1))))
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
575
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
576 (defalias 'vc-mcvs-valid-symbolic-tag-name-p 'vc-cvs-valid-symbolic-tag-name-p)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
577 (defalias 'vc-mcvs-valid-revision-number-p 'vc-cvs-valid-revision-number-p)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
578
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
579 (provide 'vc-mcvs)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
580
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
581 ;; ********** READ THIS! **********
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
582 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
583 ;; This file apparently does not work with the new (as of Emacs 23)
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
584 ;; VC code. Use at your own risk. Please contact emacs-devel if you
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
585 ;; can maintain this file and update it to work correctly.
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
586 ;;
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
587 ;; ********** READ THIS! **********
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
588
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
589 ;; arch-tag: a39c7c1c-5247-429d-88df-dd7187d2e704
8cf16a2eedeb Move here from ../, with warning comment.
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
590 ;;; vc-mcvs.el ends here