Mercurial > emacs
comparison lisp/vc-rcs.el @ 31404:f2ab9420390f
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
* vc.el: (toplevel): Don't require `dired' at run-time.
(vc-dired-resynch-file): Remove autoload cookie.
2000-09-05 Andre Spiegel <spiegel@gnu.org>
* vc.el: Made several backend functions optional.
(vc-default-responsible-p): New function.
(vc-merge): Use RET for first version to trigger merge-news, not
prefix arg.
(vc-annotate): Handle backends that do not support annotation.
(vc-default-merge-news): Removed. The existence of a merge-news
implementation is now checked on caller sites.
* vc-hooks.el (vc-default-mode-line-string): Removed CVS special
case.
* vc-cvs.el (vc-cvs-mode-line-string): New function, handles the
special case that has been removed from the default in vc-hooks.el.
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
* vc.el (vc-log-edit): Properly handle the case where FILE is nil.
2000-09-05 Andre Spiegel <spiegel@gnu.org>
* vc-hooks.el: Require vc during compilation.
(vc-file-setprop): Use `vc-touched-properties' if bound by the new
macro `with-vc-properties' in vc.el.
(vc-file-getprop): Doc fix.
(vc-after-save): Call `vc-dired-resynch-file' only if vc is loaded.
* vc.el: Require dired-aux during compilation.
(vc-name-assoc-file): Moved to vc-sccs.el.
(with-vc-properties): New macro.
(vc-checkin, vc-checkout, vc-revert, vc-cancel-version,
vc-finish-steal): Use it.
(vc-cancel-version): Moved RCS-specific code to vc-rcs.el. The call
to the backend-specific function is now supposed to do the checkout,
too.
(vc-log-edit): Handle FILE being nil and added a FIXME for log-edit.
* vc-cvs.el (vc-cvs-checkin, vc-cvs-checkout): Don't bother to
set file properties; that gets done in the generic code now.
* vc-rcs.el (vc-rcs-uncheck): Renamed to `vc-rcs-cancel-version'.
Changed parameter list, added code from vc.el that does the
checkout, possibly with a double-take.
* vc-sccs.el (vc-sccs-name-assoc-file): Moved here from vc.el.
(vc-sccs-add-triple, vc-sccs-rename-file, vc-sccs-lookup-triple): Use
the above under the new name.
(vc-sccs-uncheck): Renamed to `vc-sccs-cancel-version'. Changed
parameter list, added checkout command.
(vc-sccs-checkin, vc-sccs-checkout): Don't bother to set file
properties; that gets done in the generic code now.
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
* vc.el: Docstring fixes (courtesy of checkdoc).
2000-09-05 Stefan Monnier <monnier@cs.yale.edu>
* vc.el (vc-checkout-writable-buffer-hook)
(vc-checkout-writable-buffer): Remove.
(vc-start-entry): Always call vc-log-edit, never vc-log-mode.
(vc-log-mode): Make it into a clean derived major mode.
(vc-log-edit): Mark buffer unmodified (as vc-log-mode did) and use
vc-log-mode if log-edit is not available.
(vc-dired-mode-map): Don't set-keymap-parent yet.
(vc-dired-mode): Do set-keymap-parent here.
(vc-dired-buffers-for-dir): Nop if dired is not loaded.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 05 Sep 2000 20:08:22 +0000 |
parents | 860d7ac182e3 |
children | 18bf0c070870 |
comparison
equal
deleted
inserted
replaced
31403:736bba059dd4 | 31404:f2ab9420390f |
---|---|
3 ;; Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: FSF (see vc.el for full credits) | 5 ;; Author: FSF (see vc.el for full credits) |
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
7 | 7 |
8 ;; $Id: vc-rcs.el,v 1.36 2000/08/12 18:51:30 spiegel Exp $ | 8 ;; $Id: vc-rcs.el,v 1.1 2000/09/04 19:47:43 gerd Exp $ |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 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 | 13 ;; it under the terms of the GNU General Public License as published by |
474 "Steal the lock on the current workfile for FILE and revision REV. | 474 "Steal the lock on the current workfile for FILE and revision REV. |
475 Needs RCS 5.6.2 or later for -M." | 475 Needs RCS 5.6.2 or later for -M." |
476 (vc-do-command nil 0 "rcs" (vc-name file) "-M" | 476 (vc-do-command nil 0 "rcs" (vc-name file) "-M" |
477 (concat "-u" rev) (concat "-l" rev))) | 477 (concat "-u" rev) (concat "-l" rev))) |
478 | 478 |
479 (defun vc-rcs-uncheck (file target) | 479 (defun vc-rcs-cancel-version (file writable) |
480 "Undo the checkin of FILE's revision TARGET." | 480 "Undo the most recent checkin of FILE. |
481 (vc-do-command nil 0 "rcs" (vc-name file) (concat "-o" target))) | 481 WRITABLE non-nil means previous version should be locked." |
482 (let* ((target (vc-workfile-version file)) | |
483 (previous (if (vc-trunk-p target) "" (vc-branch-part target))) | |
484 (config (current-window-configuration)) | |
485 (done nil)) | |
486 (vc-do-command nil 0 "rcs" (vc-name file) (concat "-o" target)) | |
487 ;; Check out the most recent remaining version. If it fails, because | |
488 ;; the whole branch got deleted, do a double-take and check out the | |
489 ;; version where the branch started. | |
490 (while (not done) | |
491 (condition-case err | |
492 (progn | |
493 (vc-do-command nil 0 "co" (vc-name file) "-f" | |
494 (concat (if writable "-l" "-u") previous)) | |
495 (setq done t)) | |
496 (error (set-buffer "*vc*") | |
497 (goto-char (point-min)) | |
498 (if (search-forward "no side branches present for" nil t) | |
499 (progn (setq previous (vc-branch-part previous)) | |
500 (vc-do-command nil 0 "rcs" (vc-name file) | |
501 (concat "-b" previous)) | |
502 ;; vc-do-command popped up a window with | |
503 ;; the error message. Get rid of it, by | |
504 ;; restoring the old window configuration. | |
505 (set-window-configuration config)) | |
506 ;; No, it was some other error: re-signal it. | |
507 (signal (car err) (cdr err)))))))) | |
482 | 508 |
483 (defun vc-rcs-revert (file) | 509 (defun vc-rcs-revert (file) |
484 "Revert FILE to the version it was based on." | 510 "Revert FILE to the version it was based on." |
485 (vc-do-command nil 0 "co" (vc-name file) "-f" | 511 (vc-do-command nil 0 "co" (vc-name file) "-f" |
486 (concat "-u" (vc-workfile-version file)))) | 512 (concat "-u" (vc-workfile-version file)))) |
524 (not (eq installation 'unknown))) | 550 (not (eq installation 'unknown))) |
525 (vc-release-greater-or-equal installation release)))) | 551 (vc-release-greater-or-equal installation release)))) |
526 | 552 |
527 (defun vc-rcs-checkin (file rev comment) | 553 (defun vc-rcs-checkin (file rev comment) |
528 "RCS-specific version of `vc-backend-checkin'." | 554 "RCS-specific version of `vc-backend-checkin'." |
529 ;; Adaptation for RCS branch support: if this is an explicit checkin, | |
530 ;; or if the checkin creates a new branch, set the master file branch | |
531 ;; accordingly. | |
532 (let ((switches (if (stringp vc-checkin-switches) | 555 (let ((switches (if (stringp vc-checkin-switches) |
533 (list vc-checkin-switches) | 556 (list vc-checkin-switches) |
534 vc-checkin-switches))) | 557 vc-checkin-switches))) |
535 (let ((old-version (vc-workfile-version file)) new-version) | 558 (let ((old-version (vc-workfile-version file)) new-version) |
536 (apply 'vc-do-command nil 0 "ci" (vc-name file) | 559 (apply 'vc-do-command nil 0 "ci" (vc-name file) |