aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-04 19:49:01 +0000
committerGerd Moellmann2000-09-04 19:49:01 +0000
commit7a004b71e1ed8047d84626fb113f07db01fd7412 (patch)
tree413b309572fbda43a1190a2799a6beefac2f24c6
parentc1b2509982ddb57f1342befd04b432ea1eedf563 (diff)
downloademacs-7a004b71e1ed8047d84626fb113f07db01fd7412.tar.gz
emacs-7a004b71e1ed8047d84626fb113f07db01fd7412.zip
(vc-sccs-latest-on-branch-p): Always return t; we
don't support anything else under SCCS yet. (vc-sccs-update-changelog): Dummy implementation that simply signals an error. (vc-sccs-state-heuristic): Use file-ownership-preserved-p. (vc-sccs-workfile-unchanged-p): Fix call to vc-do-command. (vc-sccs-state-heuristic): Don't use file-writable-p. (vc-sccs-workfile-unchanged-p): Fix parenthesis. (vc-sccs-print-log, vc-sccs-diff): Insert in the current buffer. (vc-sccs-workfile-unchanged-p): Rewritten. (vc-sccs-diff): Remove optional arg CMP. (vc-sccs-state): Call vc-workfile-unchanged-p, not the SCCS-specific function. (vc-sccs-state): Fix obviously wrong parenthesis. (vc-sccs-state-heuristic): Use file-writable-p instead of comparing userids. (vc-sccs-checkout): Use `unless'. (vc-sccs-state): Use with-temp-buffer. (vc-sccs-workfile-version): Use with-temp-buffer and new vc-parse-buffer and don't bother setting the property. (vc-sccs-add-triple): Use with-current-buffer and find-file-noselect. (vc-sccs-lookup-triple): New vc-parse-buffer and turn cond -> if. Merge in code from vc-sccs-hooks.el. (vc-sccs-release, vc-sccs-system-release): Remove. Don't require 'vc anymore. (vc-sccs-responsible-p): Use expand-file-name instead of concat and file-directory-p instead of file-exists-p. (vc-sccs-check-headers): Simplify the regexp. (vc-sccs-responsible-p, vc-sccs-register): Use `vc-sccs-search-project-dir' instead of `vc-sccs-project-dir'. (vc-sccs-header): New var. (vc-sccs-rename-file): Renamed from vc-sccs-record-rename. Use `find-file-noselect' rather than `find-file' and call `vc-rename-master' to do the actual move. (vc-sccs-diff): Remove unused `backend' variable. (tail): Provide vc-sccs. (vc-sccs-checkout): Removed call to vc-file-clear-masterprops. If writable, set vc-state to 'edited rather than user login name. Require 'vc and 'vc-sccs-hooks. (vc-sccs-register-switches): New var, copied off of vc-rcs-hooks. (vc-sccs-latest-on-branch-p): Add a `FIXME' for a call to the unknown `vc-latest-version' function. It should probably refer to vc-workfile-version or somesuch, but it's very unclear to me and I don't have SCCS to test things. (vc-sccs-steal-lock): Renamed from `vc-sccs-steal'. (vc-BACKEND-responsible-p): New functions. (vc-BACKEND-register): Renamed from `vc-BACKEND-admin'. Removed query option. Redocumented. (vc-sccs-diff): Function changed name from `vc-backend-diff'. This makes `vc-diff' work. (vc-sccs-release): Doc fix. (vc-sccs-admin): Added the query-only option as required by the vc.el file. (vc-sccs-latest-on-branch-p): Function added. (vc-sccs-diff): Function added. (vc-sccs-checkout): Added function `vc-sccs-checkout'. Require vc when compiling. (vc-sccs-print-log, vc-sccs-assign-name, vc-sccs-merge) (vc-sccs-check-headers, vc-sccs-steal, vc-sccs-uncheck) (vc-sccs-revert) (vc-sccs-checkin, vc-sccs-logentry-check): New functions (code from vc.el). (vc-sccs-add-triple, vc-sccs-record-rename) (vc-sccs-lookup-triple): Moved from vc.el and renamed. (vc-sccs-admin): Doc fix. (vc-admin-sccs): Added from vc.el (vc-sccs-system-release): Renamed from vc-sccs-backend-release. (vc-sccs-release): Moved from vc.el. (vc-sccs-backend-release): New function.
-rw-r--r--lisp/ChangeLog1526
-rw-r--r--lisp/vc-sccs.el388
2 files changed, 1914 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fff537222b7..c2755daabb8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,1529 @@
12000-09-04 Gerd Moellmann <gerd@gnu.org>
2
3 * vc.el (toplevel): Require `dired' at run-time for dired-mode-map.
4
5 * Makefile.in (DONTCOMPILE): Fix typo in file name.
6
72000-09-04 Andre Spiegel <spiegel@gnu.org>
8
9 * vc-sccs.el (vc-sccs-latest-on-branch-p): Always return t; we
10 don't support anything else under SCCS yet.
11
12 * vc-hooks.el: Minor doc fixes.
13
142000-09-04 Andre Spiegel <spiegel@gnu.org>
15
16 * vc.el (vc-next-action-on-file): Do not visit the file if it's
17 not necessary. If verbose in state `needs-patch', do the same as
18 under `up-to-date'. When NOT verbose and `needs-patch', check out
19 latest version instead of `merge-news'.
20 (vc-next-action-dired): Don't mess with default-directory here; it
21 breaks other parts of dired. It is the job of the
22 backend-specific functions to adjust it temporarily if they need
23 it.
24 (vc-next-action): Remove a special CVS case.
25 (vc-clear-headers): New optional arg FILE.
26 (vc-checkin, vc-checkout): Set properties vc-state and
27 vc-checkout-time properly.
28 (vc-finish-steal): Call steal-lock, not steal, which doesn't
29 exist.
30 (vc-print-log): Use new backend function `show-log-entry'.
31 (vc-cancel-version): Do the checks in a different order. Added a
32 FIXME concerning RCS-only code.
33
34 * vc-rcs.el (vc-rcs-show-log-entry): New function.
35 (vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
36
37 * vc-cvs.el (vc-cvs-show-log-entry): New function.
38
39 * vc-hooks.el (vc-default-mode-line-string): Show state
40 `needs-patch' as a `-' too.
41
422000-09-04 Andre Spiegel <spiegel@gnu.org>
43
44 * vc.el (vc-responsible-backend): New optional arg REGISTER.
45 (vc-default-could-register): New function.
46 (vc-dired-buffers-for-dir, vc-dired-resynch-file): New functions.
47 (vc-resynch-buffer): Call vc-dired-resynch-file.
48 (vc-start-entry, vc-finish-logentry, vc-revert-buffer): Use
49 vc-resynch-buffer instead of vc-resynch-window.
50 (vc-next-action-dired): Don't redisplay here, that gets done as a
51 result of the individual file operations.
52 (vc-retrieve-snapshot): Corrected prompt order.
53
54 * vc-hooks.el (vc-after-save): Call vc-dired-resynch-file.
55
56 * vc-cvs.el (vc-cvs-stay-local): Allow it to be a hostname regexp
57 as well.
58 (vc-cvs-remote-p): Renamed to vc-cvs-stay-local-p. Handle
59 hostname regexps. Updated all callers.
60 (vc-cvs-responsible-p): Handle directories as well.
61 (vc-cvs-could-register): New function.
62 (vc-cvs-retrieve-snapshot): Parse "cvs update" output, keep file
63 properties up-to-date.
64
65 * vc-rcs.el (vc-rcs-register): If there is no RCS subdir, ask the
66 user whether to create one.
67
682000-09-04 Andre Spiegel <spiegel@gnu.org>
69
70 * vc-hooks.el (vc-file-not-found-hook): Ask the user whether to
71 check out a non-existing file.
72
73 * vc-cvs.el (vc-cvs-checkout): Do the right thing when the
74 workfile does not exist.
75
76 * vc.el (vc-version-diff): Use `require' to check for existence of
77 diff-mode.
78
792000-09-04 Andre Spiegel <spiegel@gnu.org>
80
81 * vc-cvs.el (vc-cvs-registered): Use new function
82 vc-cvs-parse-entry to do the actual work.
83
842000-09-04 Andre Spiegel <spiegel@gnu.org>
85
86 * vc-hooks.el (vc-find-backend-function): If function doesn't
87 exist, return nil instead of error.
88 (vc-call-backend): Doc fix.
89
90 * vc.el (vc-do-command): Doc fix.
91 (vc-finish-logentry): When checking in from vc-dired, choose the
92 right backend for logentry check.
93 (vc-dired-mode-map): Inherit from dired-mode-map.
94 (vc-dired-mode): Local value of dired-move-to-filename-regexp
95 simplified.
96 (vc-dired-state-info): Removed, updated caller.
97 (vc-default-dired-state-info): Use parentheses instead of hyphens.
98 (vc-dired-hook): Use vc-BACKEND-dir-state, if available.
99 (vc-dired-listing-switches): New variable.
100 (vc-directory): Use it, instead of dired-listing-switches.
101
102 * vc-cvs.el (vc-cvs-remote-p): Allow FILE to be a directory, too.
103 (vc-cvs-dir-state): New function.
104 (vc-cvs-dir-state-heuristic): New function, subroutine of the
105 above.
106 (vc-cvs-parse-entry): New function, also to be used in
107 vc-cvs-registered.
108
1092000-09-04 Stefan Monnier <monnier@cs.yale.edu>
110
111 * vc.el (vc-revert-buffer): Hide the frame for dedicated windows
112 *or* single-window-frames.
113
1142000-09-04 Andre Spiegel <spiegel@gnu.org>
115
116 * vc.el (vc-update-changelog): Split into generic part and default
117 implementation. Doc string adapted.
118 (vc-default-update-changelog): New function. Call the `rcs2log'
119 script in exec-directory, to fix a long-standing nuisance.
120
121 * vc-sccs.el (vc-sccs-update-changelog): Dummy implementation that
122 simply signals an error.
123
1242000-09-04 Stefan Monnier <monnier@cs.yale.edu>
125
126 * vc-cvs.el (vc-cvs-checkout): Slight restructuring to make the
127 control-flow more clear and to avoid running `cvs' twice.
128
129 * vc.el (vc-next-action-on-file): Doc fix.
130 (vc-maybe-resolve-conflicts): Don't just toggle smerge-mode.
131 (vc-print-log): Eval `file' before constructing the continuation.
132
1332000-09-04 Andre Spiegel <spiegel@gnu.org>
134
135 * vc.el (vc-next-action-on-file): Corrected several messages.
136 (vc-merge): Add prefix arg `merge-news'; handle it.
137
138 * vc-cvs.el (vc-cvs-workfile-version): Removed comment that this
139 is not reached. It is.
140 (vc-cvs-merge): Set state to 'edited after merge.
141 (vc-cvs-merge-news): Set workfile version to nil if not known.
142 (vc-cvs-latest-on-branch-p): Recommented. Candidate for removal.
143
144 * vc-*.el (vc-*-checkout): Switch off coding systems for checkout
145 via stdout. (Merge from main line.)
146
1472000-09-04 Stefan Monnier <monnier@cs.yale.edu>
148
149 * vc.el (vc-finish-logentry): Thinko in the "same comment"
150 detection.
151
1522000-09-04 Stefan Monnier <monnier@cs.yale.edu>
153
154 * vc.el (vc-parent-buffer, vc-parent-buffer-name): Protect them
155 against kill-all-local-variables.
156 (vc-log-edit): Don't save vc-parent-buffer any more.
157 (vc-last-comment-match): Initialize to an empty string.
158 (vc-post-command-functions): New hook.
159 (vc-do-command): Run it.
160 (vc-next-action-on-file): Remove unnecessary pop-to-buffer.
161 (vc-finish-logentry): Only add the comment to the ring if it's
162 different from the last comment entered.
163 (vc-new-comment-index): New function.
164 (vc-previous-comment): Use it. Make the minibuffer message
165 slightly less terse.
166 (vc-comment-search-reverse): Make it work forward as well. Don't
167 set vc-comment-ring-index if no match is found. Use
168 vc-new-comment-index.
169 (vc-comment-search-forward): Use vc-comment-search-reverse.
170 (vc-dired-mode-map): Don't inherit from dired-mode-map since
171 define-derived-mode will do it for us. Bind `v' to a keymap that
172 inherits from vc-prefix-map so that we can bind `vt' without
173 binding C-x v t.
174 (vc-retrieve-snapshot): Parenthesis typo.
175
176 * vc-cvs.el (vc-cvs-checkin): Raise the max-correct status from 0
177 to 1. Make sure to switch to *vc* before looking for an error
178 message. Use vc-parse-buffer.
179
1802000-09-04 Andre Spiegel <spiegel@gnu.org>
181
182 * vc.el (vc-create-snapshot, vc-default-create-snapshot): Swap DIR
183 and NAME.
184 (vc-retrieve-snapshot): Split into two parts.
185 (vc-default-retrieve-snapshot): New function.
186
187 * vc-cvs.el ((vc-cvs-create-snapshot): Swap DIR and NAME.
188 (vc-cvs-retrieve-snapshot): New function (untested).
189 (vc-cvs-stay-local): Default to t.
190 (vc-cvs-remote-p): New function and property.
191 (vc-cvs-state): Stay local only if the above is t.
192 (vc-handle-cvs): Removed.
193 (vc-cvs-registered): Don't check vc-handle-cvs -- it should all be
194 done via vc-handled-backends now.
195 (vc-cvs-header): Escape Id.
196
1972000-09-04 Stefan Monnier <monnier@cs.yale.edu>
198
199 * vc.el (vc-do-command): Remove unused commands.
200 (vc-version-diff): Make sure default-directory ends with a slash.
201 Move the window commands into a vc-exec-after.
202 (vc-print-log): Move more of the code into the `vc-exec-after'.
203
2042000-09-04 Andre Spiegel <spiegel@gnu.org>
205
206 * vc.el (vc-exec-after): Fix disassembly of previous sentinel.
207 (vc-print-log): Search current revision from beginning of buffer.
208 (vc-revert-buffer): Clear echo area after the diff is finished.
209 (vc-prefix-map): Removed definition of "t" for terse display in vc
210 dired.
211 (vc-dired-mode-map): Inherit from dired-mode-map. Added
212 definition of "vt" for terse display.
213 (vc-dired-mode): Fix dired-move-to-filename-regexp.
214
2152000-09-04 Stefan Monnier <monnier@cs.yale.edu>
216
217 * vc.el (vc-exec-after): Avoid caddr.
218
2192000-09-04 Stefan Monnier <monnier@cs.yale.edu>
220
221 * vc.el (vc-exec-after): New function.
222 (vc-do-command): Use it to add a termination message for async
223 procs.
224 (vc-checkout): Try to handle a missing-backend situation.
225 (vc-version-diff): Use vc-exec-after to fix the behavior for diffs
226 of a directory with a backend using async diffs.
227 (vc-print-log): Use vc-exec-after and use log-view-goto-rev if
228 present.
229
230 * vc-sccs.el (vc-sccs-state-heuristic): Use
231 file-ownership-preserved-p.
232
233 * vc-rcs.el (vc-rcs-state-heuristic): Use
234 file-ownership-preserved-p.
235 (vc-rcs-checkout): Remove the error-handling for missing-rcs.
236
2372000-09-04 Andre Spiegel <spiegel@gnu.org>
238
239 * vc-sccs.el (vc-sccs-workfile-unchanged-p): Fix call to
240 vc-do-command.
241
242 * vc.el (vc-next-action-on-file): Use vc-revert-buffer to revert
243 when there are no changes.
244
2452000-09-04 Andre Spiegel <spiegel@gnu.org>
246
247 * vc-sccs.el (vc-sccs-state-heuristic): Don't use file-writable-p.
248
249 * vc-rcs.el (vc-rcs-state-heuristic): Don't use file-writable-p.
250
2512000-09-04 Stefan Monnier <monnier@cs.yale.edu>
252
253 * vc-hooks.el (vc-prefix-map): Move the autoload from vc.el.
254
255 * vc.el (vc-prefix-map): Move the autoload to vc-hooks.el and move
256 the `fset' outside of the defvar so that it works even if
257 vc-prefix-map was already defined.
258 (vc-setup-buffer): New function, split out of vc-do-command.
259 (vc-do-command): Allow BUFFER to be t to mean `just use the
260 current buffer without any fuss'.
261 (vc-version-diff): Change the `diff' backend operation to just put
262 the diff in the current buffer without erasing it. Always use
263 *vc-diff* even for directory-diffs. Use vc-setup-buffer. Protect
264 shrink-window-if-larger-than-buffer.
265 (vc-print-log): Change the `print-log' backend operation to just
266 put the log in the current buffer without erasing it. Protect
267 shrink-window-if-larger-than-buffer.
268 (vc-update-change-log): Fix setd typo.
269
270 * vc-sccs.el (vc-sccs-workfile-unchanged-p): Fix parenthesis.
271 (vc-sccs-print-log, vc-sccs-diff): Insert in the current buffer.
272
273 * vc-rcs.el (vc-rcs-print-log): Insert in the current buffer.
274 (vc-rcs-diff): Insert in the current buffer and remove unused arg
275 CMP.
276
277 * vc-cvs.el (vc-cvs-state, vc-cvs-fetch-status): Use
278 with-temp-file. Use the new BUFFER=t argument to vc-do-command.
279 (vc-cvs-print-log, vc-cvs-diff): Insert in the current buffer.
280
2812000-09-04 Andre Spiegel <spiegel@gnu.org>
282
283 * vc.el (vc-workfile-unchanged-p): If checkout-time comparison is
284 not possible, use vc-BACKEND-workfile-unchanged-p.
285 (vc-default-workfile-unchanged-p): New function. Delegates to a
286 full vc-BACKEND-diff.
287
288 * vc-hooks.el (vc-simple-command): Removed.
289
290 * vc-rcs.el (vc-rcs-workfile-unchanged-p): Use vc-do-command
291 instead of vc-simple-command.
292 (vc-rcs-fetch-master-state): Removed check for unlocked-changes to
293 avoid doing a diff when opening a file.
294 (vc-rcs-state): Added check for unlocked-changes.
295 (vc-rcs-header): Escape Id.
296 (vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
297 (vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
298 version.
299
300 * vc-sccs.el (vc-sccs-workfile-unchanged-p): Rewritten.
301 (vc-sccs-diff): Remove optional arg CMP.
302 (vc-sccs-state): Call vc-workfile-unchanged-p, not the
303 SCCS-specific function.
304
305 * vc-cvs.el (vc-cvs-state): Use vc-do-command instead of
306 vc-simple-command.
307
3082000-09-04 Stefan Monnier <monnier@cs.yale.edu>
309
310 * vc.el (vc-editable-p): Renamed from vc-writable-p.
311 (with-vc-file, vc-merge): Use vc-editable-p.
312 (vc-do-command): Remove unused var vc-file and fix the
313 doubly-defined `status' var. Add a user message when starting an
314 async command.
315 (vc-restore-buffer-context, vc-resynch-buffer, vc-start-entry)
316 (vc-finish-steal, vc-checkin, vc-finish-logentry, vc-rename-file):
317 Use with-current-buffer.
318 (vc-buffer-sync): Use unless.
319 (vc-next-action-on-file): If the file is 'edited by read-only,
320 make it read-write instead of trying to commit.
321 (vc-version-diff, vc-update-change-log): Use `setq
322 default-directory' rather than `cd'.
323 (vc-log-edit): Don't forget to set default-directory in the
324 buffer.
325
326 * vc-sccs.el (vc-sccs-state): Fix obviously wrong parenthesis.
327 (vc-sccs-state-heuristic): Use file-writable-p instead of
328 comparing userids.
329 (vc-sccs-checkout): Use `unless'.
330
331 * vc-rcs.el (vc-rcs-state-heuristic): Use file-writable-p instead
332 of comparing userids.
333 (vc-rcs-fetch-master-state): Handle the case where rcs is missing.
334 Simplify the logic by eliminating unreachable code.
335 (vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
336 just do a recursive call if we need to retry.
337 (vc-rcs-checkout): Handle the case where rcs is missing by making
338 the buffer read-write if requested and re-signalling the error.
339
340 * vc-cvs.el (vc-cvs-diff): Remove unused and unsupported argument CMP.
341
3422000-09-04 Stefan Monnier <monnier@cs.yale.edu>
343
344 * vc-hooks.el (vc-handled-backends): Docstring change.
345 (vc-ignore-vc-files): Mark obsolete.
346 (vc-registered): Check vc-ignore-vc-files.
347 (vc-find-file-hook, vc-file-not-found-hook): Don't check
348 vc-ignore-vc-files.
349
350 * vc-cvs.el (vc-cvs-registered): Obey vc-handle-cvs.
351
3522000-09-04 Stefan Monnier <monnier@cs.yale.edu>
353
354 * vc.el (vc-checkout): Don't do anything special for ange-ftp
355 files since ange-ftp already has vc-registered return nil.
356
357 * vc-sccs.el (vc-sccs-state): Use with-temp-buffer.
358 (vc-sccs-workfile-version): Use with-temp-buffer and new
359 vc-parse-buffer and don't bother setting the property.
360 (vc-sccs-add-triple): Use with-current-buffer and
361 find-file-noselect.
362 (vc-sccs-lookup-triple): New vc-parse-buffer and turn cond -> if.
363
364 * vc-rcs.el (vc-rcs-find-most-recent-rev): New function. The code
365 derives from the old vc-parse-buffer but uses the revision number
366 rather than the date (much easier to compare robustly).
367 (vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
368 new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
369 locking-user more directly. Check strict locking and set
370 checkout-model appropriately.
371 (vc-rcs-parse-locks): Remove.
372 (vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
373 new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
374 (vc-rcs-system-release): Use with-current-buffer and
375 vc-parse-buffer.
376 (vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
377
378 * vc-hooks.el (vc-parse-buffer): Lobotomize the monster.
379 (vc-simple-command): Docstring fix.
380 (vc-registered): Align the way the file-handler is called with the
381 way the function itself works.
382 (vc-file-owner): Remove.
383
384 * vc-cvs.el (vc-cvs-registered): Use with-temp-buffer. Reorder
385 extraction of fields and call to file-attributes because of a
386 temporary bug in rcp.el.
387 (vc-cvs-fetch-status): Use with-current-buffer.
388
3892000-09-04 Stefan Monnier <monnier@cs.yale.edu>
390
391 * vc.el (vc-do-command): Use file-relative-name.
392 (vc-responsible-backend): Use vc-backend if possible.
393 (vc-create-snapshot): Improve the `interactive' spec. Add support
394 for branches and dispatch to backend-specific `create-snapshot'.
395 (vc-default-create-snapshot): New function, containing the bulk of
396 the old vc-create-snapshot.
397 (vc-retrieve-snapshot): Improve the interactive spec.
398
399 * vc-hooks.el (vc-header-alist): Move the dummy def from vc.el.
400 (vc-backend-hook-functions): Remove.
401 (vc-find-backend-function): Don't try to load vc-X-hooks anymore.
402 (vc-backend): Reintroduce the test for `file = nil' now that I
403 know why it was there (and added a comment to better remember).
404
405 * vc-sccs-hooks.el: Merge into vc-sccs.el * vc-sccs.el: Merge in
406 code from vc-sccs-hooks.el.
407 (vc-sccs-release, vc-sccs-system-release): Remove. Don't require
408 'vc anymore.
409 (vc-sccs-responsible-p): Use expand-file-name instead of concat
410 and file-directory-p instead of file-exists-p.
411 (vc-sccs-check-headers): Simplify the regexp.
412
413 * vc-rcs-hooks.el: Merge into vc-rcs.el * vc-rcs.el: Merge in code
414 from vc-rcs-hooks.el. Don't require 'vc anymore.
415 (vc-rcs-responsible-p): Use expand-file-name instead of concat and
416 file-directory-p instead of file-exists-p.
417
418 * vc-cvs-hooks.el: Merge into vc-cvs.el * vc-cvs.el: Merge in code
419 from vc-cvs-hooks.el.
420 (proto vc-cvs-registered): Require 'vc-cvs instead of
421 'vc-cvs-hooks. Don't require 'vc anymore.
422 (vc-cvs-responsible-p): Use expand-file-name instead of concat and
423 file-directory-p instead of file-exists-p.
424 (vc-cvs-create-snapshot): New function, replacing
425 vc-cvs-assign-name.
426 (vc-cvs-assign-name): Remove.
427
4282000-09-04 Stefan Monnier <monnier@cs.yale.edu>
429
430 * vc-cvs.el (vc-cvs-header): New var.
431
432 * vc-rcs.el (vc-rcs-exists): Remove.
433 (vc-rcs-header): New var.
434
435 * vc-sccs.el (vc-sccs-responsible-p, vc-sccs-register): Use
436 `vc-sccs-search-project-dir' instead of `vc-sccs-project-dir'.
437 (vc-sccs-header): New var.
438
439 * vc.el (vc-do-command): Get rid of the `last' argument.
440 (vc-header-alist): Remove, replaced by vc-X-header.
441 (vc-insert-headers): Use vc-X-header instead of vc-header-alist.
442 (vc-dired-hook): Use expand-file-name instead of concat.
443 (vc-directory): Use file-name-as-directory.
444 (vc-snapshot-precondition, vc-create-snapshot)
445 (vc-retrieve-snapshot): Allow the command to operate on any
446 directory.
447
448 * vc-{rcs,sccs,cvs}.el: Update calls to vc-do-command by either
449 just removing the 'WORKFILE argument or by removing the 'MASTER
450 argument and replacing `file' with (vc-name file).
451
4522000-09-04 Stefan Monnier <monnier@cs.yale.edu>
453
454 * vc.el: Update Copyright and add a crude list of backend funs.
455 (vc-writable-p): New function.
456 (with-vc-file): Use vc-writable-p.
457 (vc-next-action-on-file): Update call to vc-steal-lock and
458 cleanup.
459 (vc-register): Avoid vc-name.
460 (vc-locking-user): Remove.
461 (vc-steal-lock): Make the `owner' arg non-optional.
462 (vc-merge): Use vc-writable-p instead of vc-locking-user and
463 vc-checkout-model.
464 (vc-default-dired-state-info): Use vc-state instead of
465 vc-locking-user and return special strings for special states.
466 (vc-dired-hook): Use vc-up-to-date-p instead of vc-locking-user
467 and get rid of one of the special CVS cases.
468 (vc-cancel-version): prettify error message with \\[...].
469 (vc-rename-master): New function.
470 (vc-rename-file): Use vc-BACKEND-rename-file (which might in turn
471 use vc-rename-master) instead of vc-BACKEND-record-rename. Make
472 the CVS special case generic.
473 (vc-default-record-rename): Remove.
474 (vc-file-tree-walk-internal): Only call FUNC for files that are
475 under control of some VC backend and replace `concat' with
476 expand-file-name.
477 (vc-file-tree-walk): Update docstring.
478 (vc-version-diff, vc-snapshot-precondition, vc-create-snapshot)
479 (vc-retrieve-snapshot): Update call to vc-file-tree-walk.
480
481 * vc-sccs.el (vc-sccs-rename-file): Renamed from
482 vc-sccs-record-rename. Use `find-file-noselect' rather than
483 `find-file' and call `vc-rename-master' to do the actual move.
484 (vc-sccs-diff): Remove unused `backend' variable.
485
486 * vc-sccs-hooks.el (vc-sccs-registered): Preloaded trivial version
487 to delay loading of vc-sccs until it is really used.
488 (vc-sccs-master-templates): Preload.
489 (vc-sccs-state): Update call to vc-sccs-parse-locks.
490 (vc-sccs-project-dir): Remove (merged into
491 vc-sccs-search-project-dir).
492 (vc-sccs-search-project-dir): Rewrite using file name handling ops
493 rather than `concat', make sure it is preloaded and don't bother
494 to check that the file actually exists.
495 (vc-sccs-parse-locks): Remove unused `file' argument, remove
496 `locks' argument (use buffer's content instead) and eliminate n^2
497 behavior.
498
499 * vc-rcs.el: Update Copyright.
500 (vc-rcs-rename-file): New function.
501 (vc-rcs-diff): Remove unused `backend' variable.
502
503 * vc-hooks.el: Update Copyright.
504 (vc-backend): Don't accept a nil argument any more.
505 (vc-up-to-date-p): Turn into a defsubst.
506 (vc-possible-master): New function.
507 (vc-check-master-templates): Use `vc-possible-master' and allow
508 funs in vc-X-master-templates to return a non-existent file.
509
510 * vc-cvs.el: Update Copyright.
511 (vc-cvs-diff): Remove unused `backend' variable.
512 (vc-cvs-checkout): Only toggle read-only if the buffer is setup
513 right.
514
515 * vc-cvs-hooks.el: Preload a proto vc-cvs-registered.
516
5172000-09-04 Stefan Monnier <monnier@cs.yale.edu>
518
519 * vc-rcs-hooks.el (vc-rcs-registered): Provide a trivial version
520 since it can be called from vc-rcs.el.
521 (vc-rcs-parse-locks): Cleanup to remove an n^2 behavior.
522
5232000-09-04 Andre Spiegel <spiegel@gnu.org>
524
525 * vc.el (vc-version-diff): Expand file name read from the
526 minibuffer. Handle the case when a previous version number can't
527 be guessed. Give suitable messages when there were no differences
528 found.
529 (vc-clear-headers): Call backend-specific implementation, if one
530 exists.
531 (vc-cancel-version): Made error checks generic. When done, clear
532 headers generically, too.
533
534 * vc-rcs.el (vc-rcs-clear-headers): New function; code moved here
535 from vc-clear-headers in vc.el.
536
537 * vc-rcs-hooks.el (vc-rcs-fetch-master-state): Use vc-parse-buffer
538 correctly.
539 (vc-rcs-latest-on-branch-p): Made second argument VERSION
540 optional. Handle the case when it's not there.
541
5422000-09-04 Stefan Monnier <monnier@cs.yale.edu>
543
544 * vc.el (vc-locking-user): Moved from vc-hooks.el.
545
5462000-09-04 Stefan Monnier <monnier@cs.yale.edu>
547
548 * vc-hooks.el (vc-loadup): Remove.
549 (vc-find-backend-function): Use `require'. Also, handle the case
550 where vc-BACKEND-hooks.el doesn't exist.
551 (vc-call-backend): Cleanup.
552
5532000-09-04 Stefan Monnier <monnier@cs.yale.edu>
554
555 * vc-rcs-hooks.el (vc-rcs-templates-grabbed,
556 vc-rcs-grab-templates)
557 (vc-rcs-registered): Remove. The default function works as well.
558 * vc-sccs-hooks.el (vc-sccs-templates-grabbed,
559 vc-sccs-grab-templates)
560 (vc-sccs-registered): Remove. The default function works as well.
561
562 * vc.el (vc-version-diff): Left out a vc- in call to
563 vc-call-backend.
564 (vc-default-dired-state-info, vc-default-record-rename)
565 (vc-default-merge-news): Update for the new backend argument.
566
567 * vc-hooks.el (vc-find-backend-function): Return a cons cell if
568 using the default function.
569 (vc-call-backend): If calling the default function, pass it the
570 backend as first argument. Update the docstring accordingly.
571 (vc-default-state-heuristic, vc-default-mode-line-string): Update
572 for the new backend argument.
573 (vc-make-backend-sym): Renamed from vc-make-backend-function.
574 (vc-find-backend-function): Use the new name.
575 (vc-default-registered): New function.
576
5772000-09-04 Stefan Monnier <monnier@cs.yale.edu>
578
579 * vc.el (vc-merge): Use vc-find-backend-function.
580
581 * vc-hooks.el (vc-backend-functions): Remove.
582 (vc-loadup): Don't setup 'vc-functions.
583 (vc-find-backend-function): New function.
584 (vc-call-backend): Use above fun and populate 'vc-functions
585 lazily.
586 (vc-backend-defines): Remove.
587
5882000-09-04 Stefan Monnier <monnier@cs.yale.edu>
589
590 * vc.el (vc-register): Put a FIXME note for a newly found bug.
591 Call vc-call-backend without the leading vc-.
592 (vc-responsible-backend, vc-finish-logentry, vc-annotate)
593 (vc-check-headers): Call vc-call-backend without the leading vc-.
594 (vc-annotate-time-span): Replace confusing use of `cond' with
595 `or'.
596 (vc-annotate-display): Replace confusing use of `cond' with `or'.
597 Call vc-call-backend without the leading vc-.
598
599 * vc-cvs.el (tail): Provide vc-cvs.
600 * vc-sccs.el (tail): Provide vc-sccs.
601 * vc-rcs.el (tail): Provide vc-rcs and remove vc-rcs-logentry-check.
602
603 * vc-hooks.el (vc-backend-hook-functions, vc-backend-functions)
604 (vc-make-backend-function, vc-call): Pass names without leading
605 `vc-' to vc-call-backend so we can blindly prefix them with
606 vc-BACKEND.
607 (vc-loadup): Don't load vc-X-hooks if vc-X is requested.
608 (vc-call-backend): Always try to load vc-X-hooks.
609 (vc-registered): Remove vc- in call to vc-call-backend.
610
6112000-09-04 Stefan Monnier <monnier@cs.yale.edu>
612
613 * vc.el (vc-process-filter): New function.
614 (vc-do-command): Setup `vc-process-filter' for the async process.
615 (vc-maybe-resolve-conflicts): New function to reduce
616 code-duplication. Additionally, it puts the buffer in
617 `smerge-mode' if applicable.
618 (vc-next-action-on-file): Use `vc-maybe-resolve-conflicts' after
619 calling `merge-news'.
620 (vc-merge): Use `vc-maybe-resolve-conflicts' after calling
621 `merge'.
622 (vc-log-edit): New function. Replacement for `vc-log-mode' by
623 interfacing to log-edit.el.
624 (vc-start-entry): Call `vc-log-edit' instead of `vc-log-mode' if
625 log-edit is available.
626 (vc-resolve-conflicts): Delegate to `smerge-ediff' if available.
627
6282000-09-04 Stefan Monnier <monnier@cs.yale.edu>
629
630 * vc.el (vc-register): Remove `vc-buffer-backend' setup.
631 (vc-log-mode-map): New name for vc-log-entry-mode and merge the
632 defvar and the initialization.
633 (vc-log-mode): Minor docstring fix and use vc-log-mode-map.
634
635 * vc-hooks.el (vc-default-back-end, vc-buffer-backend): Remove.
636 (vc-kill-buffer-hook): Remove `vc-buffer-backend' handling.
637
638 * vc-cvs-hooks.el (vc-handle-cvs): Make it a defvar and add a
639 FIXME.
640
6412000-09-04 Andre Spiegel <spiegel@gnu.org>
642
643 * vc.el (vc-file-clear-masterprops): Removed.
644 (vc-checkin, vc-revert-buffer): Removed calls to the above.
645 (vc-version-diff): Use buffer-size without argument.
646 (vc-register): Heed vc-initial-comment.
647
648 * vc-rcs-hooks.el (vc-rcs-fetch-master-state): Fix regexp for
649 default branch.
650
651 * vc-rcs.el (vc-rcs-register): Parse command output to find master
652 file name and workfile version.
653 (vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
654
655 * vc-cvs.el (vc-cvs-merge-news, vc-cvs-checkout): Removed call to
656 vc-file-clear-masterprops.
657
658 * vc-sccs.el (vc-sccs-checkout): Removed call to
659 vc-file-clear-masterprops. If writable, set vc-state to 'edited
660 rather than user login name.
661
662
6632000-09-04 Stefan Monnier <monnier@cs.yale.edu>
664
665 * vc.el (vc-workfile-unchanged-p): Remove unused argument
666 `want-differences-if-changed' and simplify.
667 (vc-next-action-on-file) [needs-merge]: Resynch the buffer.
668 (vc-revert-buffer): Use `unchanged-p' rather than vc-diff's status
669 output (which is invalid for async vc-diff) to decide whether to
670 do the revert silently or not.
671
6722000-09-04 Stefan Monnier <monnier@cs.yale.edu>
673
674 * vc-hooks.el (vc-loadup): Load files quietly.
675 (vc-call-backend): Oops, brain fart.
676
6772000-09-04 Stefan Monnier <monnier@cs.yale.edu>
678
679 * vc-cvs.el (vc-cvs-state): Typo.
680 (vc-cvs-merge-news): Return the status code rather than the error
681 msg.
682
6832000-09-04 Andre Spiegel <spiegel@gnu.org>
684
685 * vc.el (with-vc-file, vc-next-action, vc-version-diff)
686 (vc-dired-mark-locked): Replaced usage of vc-locking-user with
687 vc-state or vc-up-to-date-p.
688 (vc-merge): Use vc-backend-defines to check whether merging is
689 possible. Set state to 'edited after successful merge.
690
691 * vc-hooks.el (vc-locking-user): If locked by the calling user,
692 return that name. Redocumented.
693
6942000-09-04 Stefan Monnier <monnier@cs.yale.edu>
695
696 * vc.el (vc-recompute-state, vc-next-action-on-file): Update to
697 new `vc-state' semantics.
698 (vc-finish-steal): Set 'vc-state to 'edited rather than setting
699 'vc-locking-user to the current user.
700 (vc-merge): Inline vc-backend-merge. Comment out code that I
701 don't understand and hence can't adapt to the new `vc-state' and
702 `vc-locking-user' semantics.
703 (vc-backend-merge): Remove.
704
705 * vc-{sc,r}cs.el (vc-{sc,r}cs-check{in,out}): Update 'vc-state
706 rather than 'vc-locking-user.
707
708 * vc-rcs-hooks.el (vc-rcs-consult-headers): Adapt to new `vc-state'.
709
710 * vc-hooks.el (vc-user-login-name): Simplify the code a tiny bit.
711 (vc-state): Don't use 'reserved any more. Just use the same
712 convention as the one used for vc-<backend>-state where the
713 locking user (as a string) is returned.
714 (vc-locking-user): Update, based on the above convention. The
715 'vc-locking-user property has disappeared.
716 (vc-mode-line, vc-default-mode-line-string): Adapt to new
717 `vc-state'.
718
719 * vc-cvs.el (vc-cvs-state): Don't overwrite a non-heuristic state
720 with a heuristic one.
721 (vc-cvs-merge-news): Just use 'edited for the case with conflicts.
722 (vc-cvs-checkin): Do a trivial parse to set the state in case of
723 error. That allows us to get to 'needs-merge even in the
724 stay-local case. There's still no way to detect 'needs-patch in
725 such a setup (or to force an update for that matter).
726 (vc-cvs-logentry-check): Remove, the default works as well.
727
7282000-09-04 Stefan Monnier <monnier@cs.yale.edu>
729
730 * vc-cvs.el (vc-cvs-print-log, vc-cvs-diff): Run cvs
731 asynchronously.
732
733 * vc.el (vc-do-command): kill-all-local-variables, to reset any
734 major-mode in which the buffer might have been put earlier. Use
735 `remove' and `when'. Allow `okstatus' to be `async' and use
736 `start-process' in this case.
737 (vc-version-diff): Handle the case where the diff looks empty
738 because of the use of an async process.
739
7402000-09-04 Andre Spiegel <spiegel@gnu.org>
741
742 * vc.el (vc-next-action-on-file): Removed optional parameter
743 `simple'. Recompute state unconditionally.
744 (vc-default-toggle-read-only): Removed.
745
746 * vc-hooks.el (vc-backend-functions): Removed vc-toggle-read-only.
747 (vc-toggle-read-only): Undid prev change.
748
749 * vc-cvs.el (vc-cvs-stay-local): Renamed from
750 vc-cvs-simple-toggle. Redocumented.
751 (vc-cvs-state): If locality is wanted, use vc-cvs-state-heuristic.
752 (vc-cvs-toggle-read-only): Removed.
753
7542000-09-04 Stefan Monnier <monnier@cs.yale.edu>
755
756 * vc.el (vc-backend-dispatch, vc-annotate-mode-syntax-table):
757 Remove.
758 (vc-prefix-map): Move from vc-hooks.el and make autoloaded.
759 (vc-release-greater-or-equal-p): Move to vc-rcs.el.
760 (vc-file-clear-masterprops): Braindead "fix". It was a nop and
761 still is. So maybe it should be removed.
762 (vc-head-version, vc-find-binary): Remove.
763 (vc-recompute-state): Move from vc-hooks.el.
764 (vc-next-action-on-file): Add a `simple' argument to allow
765 avoiding the `recompute' step (use for vc-cvs-simple-toggle).
766 (vc-default-toggle-read-only, vc-default-record-rename): New
767 functions.
768 (vc-next-action, vc-dired-hook): Use vc-state instead of
769 vc-cvs-status.
770 (vc-dired-mode-map): Properly defvar it.
771 (vc-print-log): Call log-view-mode if available.
772 (small-temporary-file-directory): defvar instead of use boundp.
773 (vc-merge-news): Moved to vc-cvs.el.
774 (vc-default-merge-news): New function.
775
776 * vc-sccs.el: Require 'vc and 'vc-sccs-hooks.
777 (vc-sccs-register-switches): New var, copied off of vc-rcs-hooks.
778 (vc-sccs-latest-on-branch-p): Add a `FIXME' for a call to the
779 unknown `vc-latest-version' function. It should probably refer to
780 vc-workfile-version or somesuch, but it's very unclear to me and I
781 don't have SCCS to test things.
782
783 * vc-sccs-hooks.el: Provide 'vc-sccs-hooks.
784 (vc-sccs-state-heuristic): Fix typo.
785 (vc-sccs-workfile-unchanged-p): Add missing argument.
786
787 * vc-rcs.el: Require vc and vc-rcs-hooks.
788 (vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
789 (vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
790 (vc-release-greater-or-equal-p): Move from vc.
791 (vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
792 vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
793 (vc-rcs-checkout): Add a missing `new-version' argument in the
794 call to vc-rcs-latest-on-branch-p. Hopefully that was the right
795 one.
796
797 * vc-rcs-hooks.el: Provide 'vc-rcs-hooks.
798 (vc-rcs-trunk-p, vc-rcs-branch-part): Moved from vc-rcs.el.
799 (vc-rcs-latest-on-branch-p): Use the `version' argument rather
800 than the apparently unbound `workfile-version'.
801
802 * vc-hooks.el (vc-master-templates): Def the obsolete var.
803 (vc-file-prop-obarray): Use `make-vector'.
804 (vc-backend-functions): Add new hookable functions
805 vc-toggle-read-only, vc-record-rename and vc-merge-news.
806 (vc-loadup): If neither backend nor default functions exist, use
807 the backend function rather than nil.
808 (vc-call-backend): If the function if not bound yet, try to load
809 the non-hook file to see if it provides it.
810 (vc-call): New macro plus use it wherever possible.
811 (vc-backend-subdirectory-name): Use neither `vc-default-back-end'
812 nor `vc-find-binary' since it's only called from
813 vc-mistrust-permission which is only used once the backend is
814 known.
815 (vc-checkout-model): Fix parenthesis.
816 (vc-recompute-state, vc-prefix-map): Move to vc.el.
817
818 * vc-cvs.el: Require 'vc and 'vc-cvs-hooks (for compiler
819 warnings).
820 (vc-cvs-release, vc-cvs-system-release): Remove.
821 (vc-cvs-use-edit, vc-cvs-simple-toggle): New config variables.
822 (vc-cvs-dired-state-info): Use `cvs-state' and slightly different
823 status symbols.
824 (vc-cvs-parse-status, vc-cvs-state): Move from vc-cvs-hooks.el.
825 (vc-cvs-toggle-read-only): First cut at a function to allow a
826 cvs-status-free vc-toggle-read-only.
827 (vc-cvs-merge-news): Move from cvs-merge-news in vc.el.
828 (vc-cvs-checkin): Use vc-recompute-state+vc-state instead of
829 vc-cvs-status. Also set vc-state rather than vc-locking-user.
830 (vc-cvs-checkout): Modify access rights directly if the user
831 requested not to use `cvs edit'. And refresh the mode line.
832
833 * vc-cvs-hooks.el: Provide 'vc-cvs-hooks.
834 (vc-cvs-state, vc-cvs-parse-status): Move to vc-cvs.el.
835
8362000-09-04 Stefan Monnier <monnier@cs.yale.edu>
837
838 * vc-cvs.el (vc-cvs-checkout): Docstring fix. Added a `(if
839 workfile' that got lost when the code was extracted from vc.el.
840 And merged the tail with the rest of the code (not possible in the
841 old vc.el where the tail was shared among all backends). And
842 explicitly set the state to 'edited if `writable' is set.
843
844 * vc-cvs-hooks.el (vc-cvs-registered): Use expand-file-name.
845 (vc-cvs-state): Be careful to return the value from
846 vc-cvs-parse-state.
847 (vc-cvs-parse-status): Use expand-file-name. Don't set 'vc-state
848 property but return it instead. Also be careful to handle a nil
849 or "" `rev' when workfile is non-nil (it was handled properly when
850 workfile was nil).
851
852 * vc.el: Removed those pesky unnecessary `(function' quotes.
853 (vc-annotate-mode-map, vc-annotate-mode-syntax-table): Initialize
854 directly in the defvar.
855 (vc-do-command): Bind inhibit-read-only so as to properly handle
856 the case where the destination buffer has been made read-only.
857 (vc-diff): Delegate to vc-version-diff in all cases.
858 (vc-version-diff): Setup the *vc-diff* buffer as was done in
859 vc-diff.
860 (vc-annotate-mode-variables): Removed (code moved partly to
861 defvars and partly to vc-annotate-add-menu).
862 (vc-annotate-mode): Turned into a derived-mode.
863 (vc-annotate-add-menu): Moved in code in
864 vc-annotate-mode-variables.
865 (vc-update-change-log): Use make-temp-file if available.
866
8672000-09-04 Martin Lorentzson <martinl@delysid.gnu.org>
868
869 * vc-cvs.el (vc-cvs-revert,vc-cvs-checkout): References to
870 `vc-checkout-model' updated to `vc-cvs-update-model'.
871
8722000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
873
874 * vc.el (vc-next-action-on-file): Added handling of state
875 `unlocked-changes'.
876 (vc-checkout-carefully): Is now practically obsolete, unless the
877 above is too slow to be enabled unconditionally.
878 (vc-update-change-log): Fixed typo.
879
880 * vc-sccs.el (vc-sccs-steal-lock): Renamed from `vc-sccs-steal'.
881
882 * vc-sccs-hooks.el (vc-sccs-state): Somewhat rewritten. Now
883 handles state `unlocked-changes'.
884 (vc-sccs-workfile-unchanged-p): New function, to support the
885 above.
886
887 * vc-rcs.el (vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
888
889 * vc-rcs-hooks.el (vc-rcs-state): Fixed typo.
890 (vc-rcs-fetch-master-state): Bug fixes. Recognize state
891 `unlocked-changes'.
892 (vc-rcs-workfile-unchanged-p): Renamed from
893 `vc-rcs-workfile-unchanged'. This is not a real backend-specific
894 function yet, but supposed to become one soon.
895
896 * vc-hooks.el (vc-backend-functions): Renamed `vc-steal' to
897 `vc-steal-lock'.
898 (vc-call-backend): Changed error message.
899 (vc-state): Added description of state `unlocked-changes'.
900
9012000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
902
903 * vc-cvs-hooks.el (vc-cvs-registered): Fixed bug that caused it to
904 always return t in CVS-controlled directories.
905
906 * vc.el (vc-responsible-backend): New function.
907 (vc-register): Largely rewritten.
908 (vc-admin): Removed (implementation moved into vc-register).
909 (vc-checkin): Redocumented.
910 (vc-finish-logentry): If no backend defined yet (because we are in
911 the process of registering), use the responsible backend.
912
913 * vc-hooks.el (vc-backend-hook-functions, vc-backend-functions):
914 Updated function lists.
915 (vc-call-backend): Fixed typo.
916
917 * vc-sccs.el, vc-rcs.el, vc-cvs.el (vc-BACKEND-responsible-p): New
918 functions.
919 (vc-BACKEND-register): Renamed from `vc-BACKEND-admin'. Removed
920 query option. Redocumented.
921
9222000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
923
924 * vc-rcs.el, vc-cvs.el: Updated everything to use `vc-checkout-model'.
925
926 * vc.el: Updated callers of `vc-checkout-required' to use
927 `vc-checkout-model'.
928
9292000-09-04 Martin Lorentzson <martinl@gnu.org>
930
931 * vc-rcs.el (vc-rcs-backend-release-p): function added. other
932 stuff updated to reference this function instead of the old
933 `vc-backend-release-p'.
934
9352000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
936
937 * vc-sccs-hooks.el (vc-uses-locking): Renamed to
938 vc-checkout-model. Return appropriate values. Updated callers.
939
9402000-09-04 Martin Lorentzson <martinl@gnu.org>
941
942 * vc.el (vc-backend-release, vc-backend-release-p): Functions
943 moved into vc-rcs.el
944 (vc-backend-revert): Function moved into `vc-revert';
945 `vc-next-action' must be updated to accomodate this change.
946 (vc-backend-steal): Function moved into `vc-finish-steal'.
947 (vc-backend-logentry-check): Function moved into
948 `vc-finish-logentry'.
949 (vc-backend-printlog): Function moved into `vc-print-log'.
950 (vc-backend-uncheck): Function moved into `vc-cancel-version'.
951 (vc-backend-assign-name): Function moved into
952 `vc-create-snapshot'.
953
9542000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
955
956 * vc-rcs-hooks.el, vc-cvs-hooks.el (vc-uses-locking):
957 Renamed to vc-checkout-model. Return appropriate
958 values. Updated callers.
959
960 * vc-hooks.el (vc-backend-hook-functions): Renamed vc-uses-locking
961 to vc-checkout-model.
962 (vc-checkout-required): Renamed to vc-checkout-model.
963 Re-implemented and re-commented.
964 (vc-after-save): Use vc-checkout-model.
965
9662000-09-04 Martin Lorentzson <martinl@gnu.org>
967
968 * vc.el (vc-workfile-unchanged-p,vc-diff,vc-version-diff): Updated
969 to use the vc-BACKEND-diff functions instead; `vc-diff' is now
970 working.
971
972 * vc-rcs.el (vc-rcs-logentry-check): Function added.
973
974 * vc-cvs.el (vc-cvs-logentry-check): Function added.
975
976 * vc-sccs.el (vc-sccs-diff): Function changed name from
977 `vc-backend-diff'. This makes `vc-diff' work.
978
979 * vc-hooks.el (vc-backend-functions): Added `vc-diff' to the list
980 of functions possibly implemented in a vc-BACKEND library.
981 (vc-checkout-required): Bug fixed that caused an error to be
982 signaled during `vc-after-save'.
983
984 * vc.el: Typo fixed. This checkin is made with our new VC code
985 base for the very first time. A simple `(vc-checkin
986 (buffer-file-name))' was used to perform it.
987
988 * vc-cvs.el (vc-cvs-revert,vc-cvs-checkout): Function calls to
989 `vc-checkout-required' updated to `vc-cvs-uses-locking'.
990
991 * vc-hooks.el (vc-backend-hook-functions): `vc-checkout-required'
992 updated to `vc-uses-locking'.
993 (vc-checkout-required): Call to backend function
994 `vc-checkout-required' updated to `vc-uses-locking' instead.
995
996 * vc-rcs-hooks.el (vc-rcs-fetch-master-state): Function calls to
997 `vc-checkout-required' updated to `vc-rcs-uses-locking'.
998
999 * vc.el (vc-checkin): Merged with `vc-backend-checkin' and updated
1000 to match the split into various backends.
1001 (vc-backend-checkin): Removed. Merged with `vc-checkin'.
1002 (vc-retrieve-snapshot): Bug fix.
1003
10042000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1005
1006 * vc-sccs.el (vc-sccs-release): Doc fix.
1007
10082000-09-04 Martin Lorentzson <martinl@gnu.org>
1009
1010 * vc.el (vc-next-action-on-file): Bug found and fixed.
1011 (vc-checkout, vc-version-other-window, vc-retrieve-snapshot)
1012 (vc-cancel-version): Handle of vc-BACKEND-checkout updated.
1013
1014 * vc-rcs.el (vc-rcs-checkin, vc-rcs-previous-version)
1015 (vc-rcs-checkout): Name space cleaned up. No more revision number
1016 crunching function names that are not prefixed with vc-rcs.
1017 (vc-rcs-checkout-model): Function added. References to
1018 `vc-checkout-model' replaced.
1019
10202000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1021
1022 * vc.el (vc-next-action-on-file): Rewritten for the new state model.
1023 (vc-backend-merge-news): Renamed to `vc-merge-news'. (Specific parts
1024 still need to be split, and implemented for RCS).
1025
10262000-09-04 Martin Lorentzson <martinl@gnu.org>
1027
1028 * vc-sccs-hooks.el (vc-sccs-state-heuristic): Bug found and fixed.
1029
1030 * vc-sccs.el (vc-sccs-admin): Added the query-only option as
1031 required by the vc.el file.
1032
1033 * vc-rcs.el (vc-rcs-admin): Added the query-only option as
1034 required by the vc.el file.
1035 (vc-rcs-exists): Function added.
1036
1037 * vc-cvs.el (vc-cvs-admin): Added the query-only option as
1038 required by the vc.el file.
1039
1040 * vc.el (vc-admin): Updated to handle selection of appropriate
1041 backend. Current implementation is crufty and need re-thinking.
1042
1043 * vc-hooks.el (vc-parse-buffer): Bug found and fixed.
1044
10452000-09-04 Martin Lorentzson <martinl@gnu.org>
1046
1047 * vc-cvs.el (vc-cvs-annotate-difference): Updated to handle
1048 beginning of annotate buffers correctly.
1049
1050 * vc.el (vc-annotate-get-backend, vc-annotate-display-default)
1051 (vc-annotate-add-menu, vc-annotate, vc-annotate-display): Annotate
1052 functionality updated quite a lot to support multiple backends.
1053 Variables `vc-annotate-mode', `vc-annotate-buffers',
1054 `vc-annotate-backend' added.
1055
1056 * vc-hooks.el (vc-backend-functions): `vc-annotate-command',
1057 `vc-annotate-difference' added to supported backend functions.
1058
10592000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1060
1061 * vc-rcs.el, vc-sccs.el, vc-cvs.el (vc-*-checkout):
1062 Use with-temp-file instead of /bin/sh. Merged from mainline
1063
10642000-09-04 Martin Lorentzson <martinl@gnu.org>
1065
1066 * vc-sccs-hooks.el (vc-sccs-registered): Updated.
1067
1068 * vc-rcs-hooks.el (vc-rcs-registered): Updated.
1069
1070 * vc-cvs-hooks.el (vc-cvs-registered): Updated.
1071
10722000-09-04 Martin Lorentzson <martinl@gnu.org>
1073
1074 * vc-hooks.el: vc-state-heuristic added to
1075 vc-backend-hook-functions.
1076
1077 * vc-sccs-hooks.el (vc-sccs-registered): Bug fix.
1078
1079 * vc-rcs-hooks.el (vc-rcs-registered): Bug fix.
1080
1081 * vc.el, vc-sccs-hooks.el, vc-rcs-hooks.el, vc-hooks.el: Renamed
1082 `vc-uses-locking' to `vc-checkout-required'. Renamed the `locked'
1083 state to `reserved'.
1084
1085 * vc-cvs.el, vc-cvs-hooks.el: Rename `vc-uses-locking' to
1086 `vc-checkout-required'. Rename the `locked' state to `reserved'.
1087
10882000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1089
1090 * vc-rcs-hooks.el: Implemented new state model. Hardly anything
1091 untouched.
1092
1093 * vc-rcs.el (vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
1094
1095 * vc.el (vc-update-change-log): Use small-temporary-file-directory,
1096 if defined. (Merged from main line, slightly adapted.)
1097
1098 * vc-cvs.el (vc-cvs-annotate-difference): Handle possible
1099 millenium problem (merged from mainline).
1100
11012000-09-04 Martin Lorentzson <martinl@gnu.org>
1102
1103 * vc-cvs.el: Split the annotate feature into a BACKEND-specific
1104 part and moved the non-BACKEND stuff to vc.el.
1105
1106 * vc.el: Split the annotate feature into a BACKEND specific part
1107 and moved it from the vc-cvs.el file to this one.
1108
11092000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1110
1111 * vc-hooks.el: Implemented new state model.
1112 (vc-state, vc-state-heuristic, vc-default-state-heuristic): New
1113 functions.
1114 (vc-locking-user): Simplified. Now only needed if the file is
1115 locked by somebody else.
1116 (vc-lock-from-permissions): Removed. Functionality is in
1117 vc-sccs-hooks.el and vc-rcs-hooks.el now.
1118 (vc-mode-line-string): New name for former vc-status. Adapted.
1119 (vc-mode-line): Adapted to use the above. Removed optional
1120 parameter.
1121
1122 * vc-cvs-hooks.el (vc-cvs-state, vc-cvs-state-heuristic): New
1123 functions. Various simplifications and adaptations all over the
1124 place.
1125
1126 * vc-sccs-hooks.el (vc-sccs-state, vc-sccs-state-heuristic): New
1127 functions. Simplified and adapted the rest.
1128
1129 * vc.el (vc-resynch-window): Added TODO comment: check for
1130 interaction with view mode according to recent RCS change.
1131 (vc-backend-merge-news): Merged "CMUP" patch from mainline.
1132
11332000-09-04 Martin Lorentzson <martinl@gnu.org>
1134
1135 * vc.el: Converted the remaining function comments to
1136 documentation strings.
1137
11382000-09-04 Martin Lorentzson <martinl@gnu.org>
1139
1140 * vc.el (vc-backend-release, vc-release-greater-or-equal)
1141 (vc-backend-release-p, vc-trunk-p, vc-branch-p, vc-branch-part)
1142 (vc-minor-part, vc-previous-version): Functions that operate and
1143 compare revision numbers got proper documentation. Comments added
1144 about their possible removal.
1145
11462000-09-04 Martin Lorentzson <martinl@gnu.org>
1147
1148 * vc.el (vc-latest-on-branch-p): Function removed and replaced in
1149 the vc-backend.el files.
1150
1151 * vc-sccs.el (vc-sccs-latest-on-branch-p): Function added.
1152
1153 * vc-rcs.el (vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
1154 (vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
1155 (vc-rcs-previous-version): Functions added.
1156
1157 * vc-cvs.el (vc-cvs-latest-on-branch-p): Function added.
1158
1159 * vc-rcs-hooks.el (vc-rcs-master-templates): Extra `)' removed.
1160
11612000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1162
1163 * vc-hooks.el (vc-master-templates): Is really obsolete.
1164 Commented out the definition for now. What is the right procedure
1165 to get rid of it?
1166 (vc-registered, vc-backend, vc-buffer-backend, vc-name): Largely
1167 rewritten.
1168 (vc-default-registered): Removed.
1169 (vc-check-master-templates): New function; does mostly what the
1170 above did before.
1171 (vc-locking-user): Don't rely on the backend to set the property.
1172
1173 * vc-rcs-hooks.el (vc-rcs-master-templates): Use simpler values.
1174 Rewrote documentation.
1175 (vc-rcs-templates-grabbed): New variable.
1176 (vc-rcs-grab-templates): New function.
1177 (vc-rcs-registered): Rewritten to use above mechanism.
1178
1179 * vc-sccs-hooks.el (vc-sccs-master-templates): Use simpler values.
1180 Rewrote documentation.
1181 (vc-sccs-templates-grabbed): New variable.
1182 (vc-sccs-grab-templates): New function.
1183 (vc-sccs-registered): Rewritten to use above mechanism.
1184 (vc-sccs-search-project-dir): Renamed from
1185 vc-search-sccs-project-dir. Don't throw the result, simply
1186 return it.
1187
1188 * vc-cvs-hooks.el (vc-cvs-master-templates): Variable removed.
1189 (vc-cvs-find-master): Removed. Code is now in vc-cvs-registered.
1190 (vc-cvs-registered): Does the check itself now. Simplified.
1191
1192 * vc-cvs.el (vc-cvs-revert): Merged and adapted "unedit" patch
1193 from main line.
1194
11952000-09-04 Martin Lorentzson <martinl@gnu.org>
1196
1197 * vc-cvs.el (vc-cvs-diff): Function added.
1198
1199 * vc-sccs.el (vc-sccs-diff): Function added.
1200
1201 * vc-rcs.el (vc-rcs-diff): Function added.
1202 (vc-rcs-checkout) Bug (typo) found and fixed.
1203 (vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
1204
1205 * vc.el (vc-backend-diff): Function removed and placed in the
1206 backend files.
1207
12082000-09-04 Martin Lorentzson <martinl@gnu.org>
1209
1210 * vc-cvs.el (vc-cvs-checkout): Function `vc-cvs-checkout' added.
1211
1212 * vc.el (vc-backend-checkout): Function removed and replaced in
1213 the vc-backend.el files.
1214
1215 * vc-sccs.el (vc-sccs-checkout): Added function `vc-sccs-checkout'.
1216
1217 * vc.el (vc-backend-admin): Removed and replaced in the
1218 vc-backend.el files.
1219
1220 * vc.el (Martin): Removed all the annotate functionality since it
1221 is CVS backend specific.
1222
12232000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1224
1225 * spec.txt: Added specification of vc-state.
1226
1227 * vc-sccs-hooks.el (vc-sccs-master-properties):
1228 Removed handling of vc-latest-version and
1229 vc-your-latest-version. What used to be vc-latest-version, is now
1230 returned as vc-workfile-version.
1231 (vc-sccs-workfile-version): Adapted.
1232
12332000-09-04 Dave Love <fx@gnu.org>
1234
1235 * vc.el: [Merged from mainline.]
1236 (vc-dired-mode): Make the dired-move-to-filename-regexp
1237 regexp match the date, to avoid treating date as file size.
1238 Add YYYY S option to WESTERN/
1239
12402000-09-04 Dave Love <fx@gnu.org>
1241
1242 * vc.el: Require `compile' when compiling.
1243 (vc-logentry-check-hook): New option.
1244 (vc-steal-lock): Use compose-mail.
1245 (vc-dired-mode-map): Defvar when compiling.
1246 (vc-add-triple, vc-record-rename, vc-lookup-triple): Moved to
1247 vc-sccs.el and renamed. Callers changed.
1248 (vc-backend-checkout, vc-backend-logentry-check)
1249 (vc-backend-merge-news): Doc fix.
1250 (vc-default-logentry-check): New function.
1251 (vc-backend-checkin, vc-backend-revert, vc-backend-steal)
1252 (vc-backend-uncheck, vc-backend-print-log, vc-backend-assign-name)
1253 (vc-backend-merge): Doc fix. Use backend functions.
1254 (vc-check-headers): Use backend functions.
1255
1256 * vc-cvs.el: Require vc when compiling.
1257 (vc-cvs-register-switches): Doc fix.
1258 (vc-annotate-color-map, vc-annotate-menu-elements): Fix custom type.
1259 (vc-cvs-print-log, vc-cvs-assign-name, vc-cvs-merge)
1260 (vc-cvs-check-headers, vc-cvs-steal, vc-cvs-revert, vc-cvs-checkin):
1261 New functions (code from vc.el).
1262 (vc-annotate-display-default): Fix interactive spec.
1263 (vc-annotate-time-span): Doc fix.
1264
1265 * vc-rcs.el: Require vc when compiling.
1266 (vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
1267 (vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
1268 (vc-rcs-checkin): New functions (code from vc.el).
1269 (vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
1270 Doc fix.
1271 (vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
1272
1273 * vc-sccs.el: Require vc when compiling.
1274 (vc-sccs-print-log, vc-sccs-assign-name, vc-sccs-merge)
1275 (vc-sccs-check-headers, vc-sccs-steal, vc-sccs-uncheck)
1276 (vc-sccs-revert)
1277 (vc-sccs-checkin, vc-sccs-logentry-check): New functions (code
1278 from vc.el).
1279 (vc-sccs-add-triple, vc-sccs-record-rename)
1280 (vc-sccs-lookup-triple): Moved from vc.el and renamed.
1281 (vc-sccs-admin): Doc fix.
1282
12832000-09-04 Martin Lorentzson <martinl@gnu.org>
1284
1285 * vc-rcs.el (vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
1286 (vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
1287 (vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
1288 from vc.el.
1289
1290 * vc-sccs.el (vc-admin-sccs): Added from vc.el
1291
1292 * vc-cvs.el: Moved the annotate functionality from vc.el.
1293 (vc-cvs-admin, vc-cvs-fetch-status): Added from vc.el.
1294
12952000-09-04 Dave Love <fx@gnu.org>
1296
1297 * vc.el (vc-backend-release): Call vc-system-release.
1298
1299 * vc-sccs.el (vc-sccs-system-release):
1300 Renamed from vc-sccs-backend-release.
1301
1302 * vc-rcs.el (vc-rcs-system-release):
1303 Renamed from vc-rcs-backend-release.
1304
1305 * vc-cvs.el (vc-cvs-system-release):
1306 Renamed from vc-cvs-backend-release.
1307
13082000-09-04 Dave Love <fx@gnu.org>
1309
1310 * vc.el (vc-rcs-release, vc-cvs-release, vc-sccs-release): Moved to
1311 backend files.
1312 (vc-backend-release): Dispatch to backend functions.
1313 (vc-backend-release-p): Don't mention CVS, RCS. [The SCCS case
1314 probably needs attention.]
1315
1316 * vc-sccs.el, vc-rcs.el (vc-sccs-release): Moved from vc.el.
1317 (vc-sccs-backend-release): New function.
1318
1319 * vc-cvs.el (vc-cvs-release): Moved from vc.el.
1320 (vc-cvs-backend-release): New function.
1321
1322 * vc.el (vc-dired-mode, vc-dired-reformat-line, vc-dired-purge):
1323 Doc fix.
1324 (vc-fetch-cvs-status): Moved to vc-cvs.el and renamed.
1325 (vc-default-dired-state-info): New function.
1326 (vc-dired-state-info): Dispatch to backends.
1327 (vc-dired-hook): Doc fix. Simplify, pending removal of CVS specifics.
1328
1329 * vc-cvs.el (vc-cvs-dired-state-info, vc-cvs-fetch-status): Moved
1330 from vc.el and renamed.
1331
13322000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1333
1334 * vc.el (vc-file-clear-masterprops, vc-latest-on-branch-p)
1335 (vc-version-other-window, vc-backend-assign-name): Removed
1336 references to vc-latest-version; sometimes changed into
1337 vc-workfile-version.
1338
1339 * vc-rcs-hooks.el (vc-master-workfile-version): Renamed to
1340 vc-rcs-master-workfile-version.
1341 (vc-rcs-workfile-version): Use the above. Don't call
1342 vc-latest-version (that was unreachable code, anyway).
1343 (vc-rcs-fetch-master-properties): Doc fix.
1344
1345 * vc-hooks.el (vc-latest-version, vc-your-latest-version): Removed.
1346 (vc-backend-hook-functions): Removed them from this list, too.
1347 (vc-fetch-properties): Removed.
1348 (vc-workfile-version): Doc fix.
1349
1350 * vc-rcs-hooks.el (vc-rcs-consult-headers): New function.
1351 (vc-rcs-workfile-version, vc-rcs-locking-user)
1352 (vc-rcs-uses-locking): Use it.
1353
1354 * vc-hooks.el (vc-consult-rcs-headers):
1355 Moved into vc-rcs-hooks.el, under the name
1356 vc-rcs-consult-headers.
1357
1358 * vc-cvs-hooks.el (vc-cvs-workfile-version): Don't consult RCS
1359 headers.
1360 (vc-cvs-find-master): Use this name only; correct different
1361 versions of the name.
1362
1363 * vc-sccs-hooks.el (vc-sccs-master-locks, vc-sccs-master-locking-user):
1364 New functions.
1365 (vc-sccs-locking-user): Use the latter.
1366
1367 * vc-rcs-hooks.el (vc-rcs-master-locks, vc-rcs-master-locking-user):
1368 New functions.
1369
1370 * vc-hooks.el (vc-master-locks, vc-master-locking-user):
1371 Moved into both
1372 vc-rcs-hooks.el and vc-sccs-hooks.el. These properties and access
1373 functions are implementation details of those two backends.
1374
13752000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1376
1377 * vc-rcs-hooks.el (vc-rcs-fetch-master-properties)
1378 (vc-rcs-parse-locks): RCS-specific code moved here from vc-hooks.
1379
1380 * vc-sccs-hooks.el (vc-sccs-fetch-master-properties)
1381 (vc-sccs-parse-locks): SCCS-specific code moved here from
1382 vc-hooks.
1383
1384 * vc-cvs-hooks.el (vc-cvs-fetch-master-properties): CVS-specific
1385 code moved here from vc-hooks.
1386
1387 * vc-hooks.el (vc-parse-locks, vc-fetch-master-properties): Split
1388 into back-end specific parts and removed. Callers not updated
1389 yet; because I guess these callers will disappear into back-end
1390 specific files anyway.
1391
13922000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1393
1394 * vc.el (with-vc-file, vc-next-action-on-file, vc-merge)
1395 (vc-backend-checkout): Changed calls to `vc-checkout-model' to
1396 `vc-uses-locking'.
1397
1398 * vc-hooks.el (vc-checkout-model): Renamed to vc-uses-locking.
1399 Store yes/no in the property, and return t/nil. Updated all
1400 callers.
1401
1402 * vc-sccs-hooks.el (vc-sccs-checkout-model): Renamed to
1403 vc-sccs-uses-locking. Don't set property.
1404 (vc-sccs-locking-user): Don't set property.
1405
1406 * vc-cvs-hooks.el (vc-cvs-checkout-model): Renamed to
1407 vc-cvs-uses-locking. Don't set property here; leave that to
1408 vc-hooks.
1409 (vc-cvs-locking-user): Reflect above change. Streamlined.
1410
1411 * vc-rcs-hooks.el (vc-rcs-checkout-model): Renamed to
1412 vc-rcs-uses-locking.
1413 (vc-rcs-locking-user): Reflect above change.
1414
14152000-09-04 Dave Love <fx@gnu.org>
1416
1417 * vc-sccs-hooks.el (vc-sccs-checkout-model): New function.
1418
1419 * vc-rcs-hooks.el (vc-rcs-checkout-model): New function.
1420
1421 * vc-hooks.el (vc-checkout-model): Punt to backends.
1422
1423 * vc-cvs-hooks.el (vc-cvs-checkout-model): New function.
1424
1425 * vc.el (vc-fetch-cvs-status): Use renamed vc-cvs-parse-status.
1426
1427 * vc-rcs-hooks.el (vc-rcs-workfile-version, vc-rcs-locking-user):
1428 New functions.
1429
1430 * vc-sccs-hooks.el (vc-sccs-workfile-version, vc-sccs-locking-user):
1431 New functions.
1432
1433 * vc-cvs-hooks.el (vc-handle-cvs): Doc fix.
1434 (vc-cvs-workfile-version, vc-cvs-locking-user): New functions.
1435
1436 * vc-hooks.el (vc-default-locking-user): New function.
1437 (vc-locking-user, vc-workfile-version): Punt to backends.
1438
14392000-09-04 Dave Love <fx@gnu.org>
1440
1441 * vc-hooks.el (vc-rcsdiff-knows-brief, vc-rcs-lock-from-diff)
1442 (vc-master-workfile-version): Moved from vc-hooks.
1443
1444 * vc-rcs-hooks.el: Fix duplicate code in last change.
1445
1446 * vc-rcs-hooks.el: Require vc-hooks when compiling.
1447 (vc-rcs-master-templates): Improve :type.
1448 (vc-rcsdiff-knows-brief, vc-rcs-lock-from-diff,
1449 vc-master-workfile-version): Moved from vc-hooks.
1450
1451 * vc-sccs-hooks.el: Require vc-hooks when compiling.
1452 (vc-sccs-master-templates): Improve :type.
1453 (vc-sccs-lock-file): Moved/renamed from vc-hooks.el vc-lock-file.
1454
1455 * vc-hooks.el (vc-lock-file): Moved to vc-sccs-hooks and renamed.
1456
1457 * vc-cvs-hooks.el: Require vc-hooks when compiling.
1458 (vc-cvs-master-templates): Improve :type. Use
1459 vc-cvs-find-cvs-master.
1460 (vc-handle-cvs, vc-cvs-parse-status, vc-cvs-status): Moved here
1461 from vc-hooks.
1462 (vc-vc-find-cvs-master): Renamed to vc-cvs-find-cvs-master.
1463
1464 * vc-hooks.el (vc-handle-cvs, vc-cvs-parse-status, vc-cvs-status):
1465 Moved to vc-cvs-hooks.
1466
1467 * vc-hooks.el: Add doc strings in various places. Simplify the
1468 minor mode setup.
1469 (vc-handled-backends): New user variable.
1470 (vc-parse-buffer, vc-insert-file, vc-default-registered): Minor
1471 simplification.
1472
14732000-09-04 Dave Love <fx@gnu.org>
1474
1475 * vc.el: Some doc fixes for autoloaded and interactive functions.
1476 Fix compilation warnings from ediff stuff.
1477 (vc-rcs-release, vc-cvs-release, vc-sccs-release): Custom fix.
1478
1479 * vc-sccs-hooks.el (vc-sccs-master-templates): Add :version.
1480
1481 * vc-cvs-hooks.el (vc-cvs-master-templates): Add :version.
1482
1483 * vc-rcs-hooks.el (vc-rcs-master-templates): Add :version.
1484
14852000-09-04 Dave Love <fx@gnu.org>
1486
1487 * vc-hooks.el (vc-backend-hook-functions, vc-backend-functions):
1488 New variable.
1489 (vc-make-backend-function, vc-loadup, vc-call-backend)
1490 (vc-backend-defines): New functions.
1491
1492 * vc-hooks.el: Various doc fixes.
1493 (vc-default-back-end, vc-follow-symlinks): Custom fix.
1494 (vc-match-substring): Function removed. Callers changed to use
1495 match-string.
1496 (vc-lock-file, vc-consult-rcs-headers, vc-kill-buffer-hook):
1497 Simplify.
1498
14992000-09-04 Dave Love <fx@gnu.org>
1500
1501 * vc-sccs-hooks.el (vc-sccs-master-templates): Fix doc, custom
1502 type.
1503 (vc-sccs-project-dir, vc-search-sccs-project-dir)
1504 (vc-sccs-registered): Doc fix.
1505
1506 * vc-cvs-hooks.el (vc-cvs-master-templates): Fix doc, custom type.
1507 (vc-cvs-registered): Doc fix.
1508
1509 * vc-rcs-hooks.el (vc-rcs-master-templates): Fix doc, custom type.
1510 (vc-rcs-registered): Doc fix.
1511
15122000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1513
1514 * vc-rcs-hooks.el, vc-cvs-hooks.el, vc-sccs-hooks.el: New file.
1515
1516 * vc-hooks.el: vc-registered has been renamed
1517 vc-default-registered. Some functions have been moved to the
1518 backend specific files. they all support the
1519 vc-BACKEND-registered functions.
1520
15212000-09-04 Andre Spiegel <spiegel@inf.fu-berlin.de>
1522
1523 * vc-hooks.el: This is 1998-11-11T18:47:32Z!kwzh@gnu.org from the emacs sources
1524
1525 * vc.el: This is 1999-03-13T05:04:24Z!kwzh@gnu.org from the emacs sources
1526
12000-09-04 Dave Love <fx@gnu.org> 15272000-09-04 Dave Love <fx@gnu.org>
2 1528
3 * wid-edit.el (widget-sexp-validate): Fix garbled code. 1529 * wid-edit.el (widget-sexp-validate): Fix garbled code.
diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el
new file mode 100644
index 00000000000..9edd1f25267
--- /dev/null
+++ b/lisp/vc-sccs.el
@@ -0,0 +1,388 @@
1;;; vc-sccs.el --- support for SCCS version-control
2
3;; Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
4
5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7
8;; $Id: vc-sccs.el,v 1.35 2000/08/13 11:52:19 spiegel Exp $
9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 2, or (at your option)
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25;; Boston, MA 02111-1307, USA.
26
27;;; Commentary:
28
29;;; Code:
30
31(defcustom vc-sccs-register-switches nil
32 "*A string or list of strings; extra switches for registering a file
33in |SCCS. These are passed to the checkin program by
34\\[vc-sccs-register]."
35 :type '(choice (const :tag "None" nil)
36 (string :tag "Argument String")
37 (repeat :tag "Argument List"
38 :value ("")
39 string))
40 :group 'vc)
41
42(defcustom vc-sccs-header (or (cdr (assoc 'SCCS vc-header-alist)) '("%W%"))
43 "*Header keywords to be inserted by `vc-insert-headers'."
44 :type 'string
45 :group 'vc)
46
47;;;###autoload
48(defcustom vc-sccs-master-templates
49 '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)
50 "*Where to look for SCCS master files.
51For a description of possible values, see `vc-check-master-templates'."
52 :type '(choice (const :tag "Use standard SCCS file names"
53 ("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir))
54 (repeat :tag "User-specified"
55 (choice string
56 function)))
57 :version "20.5"
58 :group 'vc)
59
60;;;###autoload
61(progn (defun vc-sccs-registered (f) (vc-default-registered 'SCCS f)))
62
63(defun vc-sccs-state (file)
64 "SCCS-specific function to compute the version control state."
65 (with-temp-buffer
66 (if (vc-insert-file (vc-sccs-lock-file file))
67 (let* ((locks (vc-sccs-parse-locks))
68 (workfile-version (vc-workfile-version file))
69 (locking-user (cdr (assoc workfile-version locks))))
70 (if (not locking-user)
71 (if (vc-workfile-unchanged-p file)
72 'up-to-date
73 'unlocked-changes)
74 (if (string= locking-user (vc-user-login-name))
75 'edited
76 locking-user)))
77 'up-to-date)))
78
79(defun vc-sccs-state-heuristic (file)
80 "SCCS-specific state heuristic."
81 (if (not (vc-mistrust-permissions file))
82 ;; This implementation assumes that any file which is under version
83 ;; control and has -rw-r--r-- is locked by its owner. This is true
84 ;; for both RCS and SCCS, which keep unlocked files at -r--r--r--.
85 ;; We have to be careful not to exclude files with execute bits on;
86 ;; scripts can be under version control too. Also, we must ignore the
87 ;; group-read and other-read bits, since paranoid users turn them off.
88 (let* ((attributes (file-attributes file))
89 (owner-uid (nth 2 attributes))
90 (permissions (nth 8 attributes)))
91 (if (string-match ".r-..-..-." permissions)
92 'up-to-date
93 (if (string-match ".rw..-..-." permissions)
94 (if (file-ownership-preserved-p file)
95 'edited
96 (vc-user-login-name owner-uid))
97 ;; Strange permissions.
98 ;; Fall through to real state computation.
99 (vc-sccs-state file)))
100 (vc-sccs-state file))))
101
102(defun vc-sccs-workfile-version (file)
103 "SCCS-specific version of `vc-workfile-version'."
104 (with-temp-buffer
105 (vc-insert-file (vc-name file) "^\001e")
106 (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
107
108(defun vc-sccs-checkout-model (file)
109 "SCCS-specific version of `vc-checkout-model'."
110 'locking)
111
112(defun vc-sccs-workfile-unchanged-p (file)
113 "SCCS-specific implementation of vc-workfile-unchanged-p."
114 (apply 'vc-do-command nil 1 "vcdiff" (vc-name file)
115 (list "--brief" "-q"
116 (concat "-r" (vc-workfile-version file)))))
117
118;; internal code
119
120;; This function is wrapped with `progn' so that the autoload cookie
121;; copies the whole function itself into loaddefs.el rather than just placing
122;; a (autoload 'vc-sccs-search-project-dir "vc-sccs") which would not
123;; help us avoid loading vc-sccs.
124;;;###autoload
125(progn (defun vc-sccs-search-project-dir (dirname basename)
126 "Return the name of a master file in the SCCS project directory.
127Does not check whether the file exists but returns nil if it does not
128find any project directory."
129 (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
130 (when project-dir
131 (if (file-name-absolute-p project-dir)
132 (setq dirs '("SCCS" ""))
133 (setq dirs '("src/SCCS" "src" "source/SCCS" "source"))
134 (setq project-dir (expand-file-name (concat "~" project-dir))))
135 (while (and (not dir) dirs)
136 (setq dir (expand-file-name (car dirs) project-dir))
137 (unless (file-directory-p dir)
138 (setq dir nil)
139 (setq dirs (cdr dirs))))
140 (and dir (expand-file-name (concat "s." basename) dir))))))
141
142(defun vc-sccs-lock-file (file)
143 "Generate lock file name corresponding to FILE."
144 (let ((master (vc-name file)))
145 (and
146 master
147 (string-match "\\(.*/\\)\\(s\\.\\)\\(.*\\)" master)
148 (replace-match "p." t t master 2))))
149
150(defun vc-sccs-parse-locks ()
151 "Parse SCCS locks in current buffer.
152The result is a list of the form ((VERSION . USER) (VERSION . USER) ...)."
153 (let (master-locks)
154 (goto-char (point-min))
155 (while (re-search-forward "^\\([0-9.]+\\) [0-9.]+ \\([^ ]+\\) .*\n?"
156 nil t)
157 (setq master-locks
158 (cons (cons (match-string 1) (match-string 2)) master-locks)))
159 ;; FIXME: is it really necessary to reverse ?
160 (nreverse master-locks)))
161
162(defun vc-sccs-print-log (file)
163 "Get change log associated with FILE."
164 (vc-do-command t 0 "prs" (vc-name file)))
165
166(defun vc-sccs-assign-name (file name)
167 "Assign to FILE's latest version a given NAME."
168 (vc-sccs-add-triple name file (vc-workfile-version file)))
169
170;; Named-configuration support
171
172(defun vc-sccs-add-triple (name file rev)
173 (with-current-buffer
174 (find-file-noselect
175 (expand-file-name vc-name-assoc-file
176 (file-name-directory (vc-name file))))
177 (goto-char (point-max))
178 (insert name "\t:\t" file "\t" rev "\n")
179 (basic-save-buffer)
180 (kill-buffer (current-buffer))))
181
182(defun vc-sccs-rename-file (old new)
183 ;; Move the master file (using vc-rcs-master-templates).
184 (vc-rename-master (vc-name old) new vc-sccs-master-templates)
185 ;; Update the snapshot file.
186 (with-current-buffer
187 (find-file-noselect
188 (expand-file-name vc-name-assoc-file
189 (file-name-directory (vc-name old))))
190 (goto-char (point-min))
191 ;; (replace-regexp (concat ":" (regexp-quote old) "$") (concat ":" new))
192 (while (re-search-forward (concat ":" (regexp-quote old) "$") nil t)
193 (replace-match (concat ":" new) nil nil))
194 (basic-save-buffer)
195 (kill-buffer (current-buffer))))
196
197(defun vc-sccs-lookup-triple (file name)
198 "Return the numeric version corresponding to a named snapshot of FILE.
199If NAME is nil or a version number string it's just passed through."
200 (if (or (null name)
201 (let ((firstchar (aref name 0)))
202 (and (>= firstchar ?0) (<= firstchar ?9))))
203 name
204 (with-temp-buffer
205 (vc-insert-file
206 (expand-file-name vc-name-assoc-file
207 (file-name-directory (vc-name file))))
208 (vc-parse-buffer (concat name "\t:\t" file "\t\\(.+\\)") 1))))
209
210(defun vc-sccs-merge (file first-version &optional second-version)
211 (error "Merging not implemented for SCCS"))
212
213(defun vc-sccs-check-headers ()
214 "Check if the current file has any headers in it."
215 (save-excursion
216 (goto-char (point-min))
217 (re-search-forward "%[A-Z]%" nil t)))
218
219(defun vc-sccs-steal-lock (file &optional rev)
220 "Steal the lock on the current workfile for FILE and revision REV."
221 (vc-do-command nil 0 "unget" (vc-name file) "-n" (if rev (concat "-r" rev)))
222 (vc-do-command nil 0 "get" (vc-name file) "-g" (if rev (concat "-r" rev))))
223
224(defun vc-sccs-uncheck (file target)
225 "Undo the checkin of FILE's revision TARGET."
226 (vc-do-command nil 0 "rmdel" (vc-name file) (concat "-r" target)))
227
228(defun vc-sccs-revert (file)
229 "Revert FILE to the version it was based on."
230 (vc-do-command nil 0 "unget" (vc-name file))
231 (vc-do-command nil 0 "get" (vc-name file))
232 ;; Checking out explicit versions is not supported under SCCS, yet.
233 ;; We always "revert" to the latest version; therefore
234 ;; vc-workfile-version is cleared here so that it gets recomputed.
235 (vc-file-setprop file 'vc-workfile-version nil))
236
237(defun vc-sccs-checkin (file rev comment)
238 "SCCS-specific version of `vc-backend-checkin'."
239 (let ((switches (if (stringp vc-checkin-switches)
240 (list vc-checkin-switches)
241 vc-checkin-switches)))
242 (apply 'vc-do-command nil 0 "delta" (vc-name file)
243 (if rev (concat "-r" rev))
244 (concat "-y" comment)
245 switches)
246 (vc-file-setprop file 'vc-state 'up-to-date)
247 (vc-file-setprop file 'vc-workfile-version nil)
248 (if vc-keep-workfiles
249 (vc-do-command nil 0 "get" (vc-name file)))))
250
251(defun vc-sccs-latest-on-branch-p (file)
252 "Return t iff the current workfile version of FILE is the latest on
253its branch."
254 ;; Always return t; we do not support previous versions in the workfile
255 ;; under SCCS.
256 t)
257
258(defun vc-sccs-logentry-check ()
259 "Check that the log entry in the current buffer is acceptable for SCCS."
260 (when (>= (buffer-size) 512)
261 (goto-char 512)
262 (error "Log must be less than 512 characters; point is now at pos 512")))
263
264(defun vc-sccs-diff (file &optional oldvers newvers)
265 "Get a difference report using SCCS between two versions of FILE."
266 (setq oldvers (vc-sccs-lookup-triple file oldvers))
267 (setq newvers (vc-sccs-lookup-triple file newvers))
268 (let* ((diff-switches-list (if (listp diff-switches)
269 diff-switches
270 (list diff-switches)))
271 (options (append (list "-q"
272 (and oldvers (concat "-r" oldvers))
273 (and newvers (concat "-r" newvers)))
274 diff-switches-list)))
275 (apply 'vc-do-command t 1 "vcdiff" (vc-name file) options)))
276
277(defun vc-sccs-responsible-p (file)
278 "Return non-nil if SCCS thinks it would be responsible for registering FILE."
279 ;; TODO: check for all the patterns in vc-sccs-master-templates
280 (or (file-directory-p (expand-file-name "SCCS" (file-name-directory file)))
281 (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "")
282 (file-name-nondirectory file)))))
283
284(defun vc-sccs-register (file &optional rev comment)
285 "Register FILE into the SCCS version-control system.
286REV is the optional revision number for the file. COMMENT can be used
287to provide an initial description of FILE.
288
289`vc-register-switches' and `vc-sccs-register-switches' are passed to
290the SCCS command (in that order).
291
292Automatically retrieve a read-only version of the file with keywords
293expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
294 (vc-file-clearprops file)
295 (let* ((switches (list
296 (if (stringp vc-register-switches)
297 (list vc-register-switches)
298 vc-register-switches)
299 (if (stringp vc-sccs-register-switches)
300 (list vc-sccs-register-switches)
301 vc-sccs-register-switches)))
302 (dirname (or (file-name-directory file) ""))
303 (basename (file-name-nondirectory file))
304 (project-file (vc-sccs-search-project-dir dirname basename)))
305 (let ((vc-name
306 (or project-file
307 (format (car vc-sccs-master-templates) dirname basename)))|)
308 (apply 'vc-do-command nil 0 "admin" nil
309 (and rev (concat "-r" rev))
310 "-fb"
311 (concat "-i" file)
312 (and comment (concat "-y" comment))
313 vc-name
314 switches))
315 (delete-file file)
316 (if vc-keep-workfiles
317 (vc-do-command nil 0 "get" (vc-name file)))))
318
319(defun vc-sccs-checkout (file &optional writable rev workfile)
320 "Retrieve a copy of a saved version of an SCCS controlled FILE into
321a WORKFILE. WRITABLE non-nil means that the file should be writable.
322REV is the revision to check out into WORKFILE."
323 (let ((filename (or workfile file))
324 (file-buffer (get-file-buffer file))
325 switches)
326 (message "Checking out %s..." filename)
327 (save-excursion
328 ;; Change buffers to get local value of vc-checkout-switches.
329 (if file-buffer (set-buffer file-buffer))
330 (setq switches (if (stringp vc-checkout-switches)
331 (list vc-checkout-switches)
332 vc-checkout-switches))
333 ;; Save this buffer's default-directory
334 ;; and use save-excursion to make sure it is restored
335 ;; in the same buffer it was saved in.
336 (let ((default-directory default-directory))
337 (save-excursion
338 ;; Adjust the default-directory so that the check-out creates
339 ;; the file in the right place.
340 (setq default-directory (file-name-directory filename))
341
342 (and rev (string= rev "") (setq rev nil))
343 (if workfile
344 ;; Some SCCS implementations allow checking out directly to a
345 ;; file using the -G option, but then some don't so use the
346 ;; least common denominator approach and use the -p option
347 ;; ala RCS.
348 (let ((vc-modes (logior (file-modes (vc-name file))
349 (if writable 128 0)))
350 (failed t))
351 (unwind-protect
352 (progn
353 (let ((coding-system-for-read 'no-conversion)
354 (coding-system-for-write 'no-conversion))
355 (with-temp-file filename
356 (apply 'vc-do-command
357 (current-buffer) 0 "get" (vc-name file)
358 "-s" ;; suppress diagnostic output
359 (if writable "-e")
360 "-p"
361 (and rev
362 (concat "-r"
363 (vc-sccs-lookup-triple file rev)))
364 switches)))
365 (set-file-modes filename
366 (logior (file-modes (vc-name file))
367 (if writable 128 0)))
368 (setq failed nil))
369 (and failed (file-exists-p filename)
370 (delete-file filename))))
371 (apply 'vc-do-command nil 0 "get" (vc-name file)
372 (if writable "-e")
373 (and rev (concat "-r" (vc-sccs-lookup-triple file rev)))
374 switches)
375 (vc-file-setprop file 'vc-workfile-version nil))
376 (unless workfile
377 (if writable
378 (vc-file-setprop file 'vc-state 'edited))
379 (vc-file-setprop file
380 'vc-checkout-time (nth 5 (file-attributes file))))
381 (message "Checking out %s...done" filename))))))
382
383(defun vc-sccs-update-changelog (files)
384 (error "Sorry, generating ChangeLog entries is not implemented for SCCS."))
385
386(provide 'vc-sccs)
387
388;;; vc-sccs.el ends here