* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
(vc-do-command, vc-set-async-update):
* lisp/vc/vc-mtn.el (vc-mtn-dir-status):
* lisp/vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
(vc-hg-pull, vc-hg-merge-branch):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
(vc-git-merge-branch):
* lisp/vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
(vc-cvs-dir-status-files):
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
(vc-bzr-dir-status-files):
* lisp/vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
* lisp/vc/vc-annotate.el: Use lexical-binding.
(vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
(vc-annotate): Don't use `goto-line'.
* lisp/vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
(vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
* lisp/vc/vc-svn.el: Use lexical-binding.
(vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
* lisp/vc/vc-sccs.el:
* lisp/vc/vc-rcs.el: Use lexical-binding.
2013-09-04 21:09:42 +00:00
|
|
|
|
;;; vc-rcs.el --- support for RCS version-control -*- lexical-binding:t -*-
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2015-01-01 22:26:41 +00:00
|
|
|
|
;; Copyright (C) 1992-2015 Free Software Foundation, Inc.
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
|
|
|
|
;; Author: FSF (see vc.el for full credits)
|
|
|
|
|
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
|
2010-08-29 16:17:13 +00:00
|
|
|
|
;; Package: vc
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2001-07-16 12:23:00 +00:00
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
|
|
;; See vc.el
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2011-03-03 07:52:10 +00:00
|
|
|
|
;; Some features will not work with ancient RCS versions. Where
|
2009-10-14 06:00:51 +00:00
|
|
|
|
;; appropriate, VC finds out which version you have, and allows or
|
2011-03-03 07:52:10 +00:00
|
|
|
|
;; disallows those features.
|
|
|
|
|
|
2009-10-14 06:00:51 +00:00
|
|
|
|
;; You can support the RCS -x option by customizing vc-rcs-master-templates.
|
|
|
|
|
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
;;; Code:
|
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
;;;
|
|
|
|
|
;;; Customization options
|
|
|
|
|
;;;
|
|
|
|
|
|
2000-09-22 11:57:30 +00:00
|
|
|
|
(eval-when-compile
|
More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 23:13:41 +00:00
|
|
|
|
(require 'cl-lib)
|
2001-02-01 15:11:05 +00:00
|
|
|
|
(require 'vc))
|
2000-09-22 11:57:30 +00:00
|
|
|
|
|
2012-02-25 04:29:09 +00:00
|
|
|
|
(defgroup vc-rcs nil
|
|
|
|
|
"VC RCS backend."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:group 'vc)
|
|
|
|
|
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(defcustom vc-rcs-release nil
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"The release number of your RCS installation, as a string.
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
If nil, VC itself computes this value when it is first needed."
|
|
|
|
|
:type '(choice (const :tag "Auto" nil)
|
|
|
|
|
(string :tag "Specified")
|
|
|
|
|
(const :tag "Unknown" unknown))
|
2012-02-25 04:29:09 +00:00
|
|
|
|
:group 'vc-rcs)
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
|
|
|
|
(defcustom vc-rcs-register-switches nil
|
2008-12-04 07:01:56 +00:00
|
|
|
|
"Switches for registering a file in RCS.
|
|
|
|
|
A string or list of strings passed to the checkin program by
|
|
|
|
|
\\[vc-register]. If nil, use the value of `vc-register-switches'.
|
|
|
|
|
If t, use no switches."
|
|
|
|
|
:type '(choice (const :tag "Unspecified" nil)
|
|
|
|
|
(const :tag "None" t)
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(string :tag "Argument String")
|
2008-12-04 07:01:56 +00:00
|
|
|
|
(repeat :tag "Argument List" :value ("") string))
|
2000-09-07 20:02:38 +00:00
|
|
|
|
:version "21.1"
|
2012-02-25 04:29:09 +00:00
|
|
|
|
:group 'vc-rcs)
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2001-02-01 15:11:05 +00:00
|
|
|
|
(defcustom vc-rcs-diff-switches nil
|
2008-12-03 07:39:20 +00:00
|
|
|
|
"String or list of strings specifying switches for RCS diff under VC.
|
|
|
|
|
If nil, use the value of `vc-diff-switches'. If t, use no switches."
|
|
|
|
|
:type '(choice (const :tag "Unspecified" nil)
|
|
|
|
|
(const :tag "None" t)
|
2001-02-01 15:11:05 +00:00
|
|
|
|
(string :tag "Argument String")
|
2008-12-03 07:39:20 +00:00
|
|
|
|
(repeat :tag "Argument List" :value ("") string))
|
2001-02-01 15:11:05 +00:00
|
|
|
|
:version "21.1"
|
2012-02-25 04:29:09 +00:00
|
|
|
|
:group 'vc-rcs)
|
2001-02-01 15:11:05 +00:00
|
|
|
|
|
2010-10-03 21:05:47 +00:00
|
|
|
|
(defcustom vc-rcs-header '("\$Id\$")
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Header keywords to be inserted by `vc-insert-headers'."
|
2001-01-09 14:53:56 +00:00
|
|
|
|
:type '(repeat string)
|
2010-10-03 21:05:47 +00:00
|
|
|
|
:version "24.1" ; no longer consult the obsolete vc-header-alist
|
2012-02-25 04:29:09 +00:00
|
|
|
|
:group 'vc-rcs)
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
|
|
|
|
(defcustom vc-rcsdiff-knows-brief nil
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Indicates whether rcsdiff understands the --brief option.
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
The value is either `yes', `no', or nil. If it is nil, VC tries
|
|
|
|
|
to use --brief and sets this variable to remember whether it worked."
|
|
|
|
|
:type '(choice (const :tag "Work out" nil) (const yes) (const no))
|
2012-02-25 04:29:09 +00:00
|
|
|
|
:group 'vc-rcs)
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2012-09-29 23:19:46 +00:00
|
|
|
|
;; This needs to be autoloaded because vc-rcs-registered uses it (via
|
2014-11-22 11:03:57 +00:00
|
|
|
|
;; vc-default-registered), and vc-hooks needs to be able to check
|
2012-09-29 23:19:46 +00:00
|
|
|
|
;; for a registered backend without loading every backend.
|
2012-09-29 19:19:17 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom vc-rcs-master-templates
|
|
|
|
|
(purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s"))
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Where to look for RCS master files.
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
For a description of possible values, see `vc-check-master-templates'."
|
|
|
|
|
:type '(choice (const :tag "Use standard RCS file names"
|
|
|
|
|
'("%sRCS/%s,v" "%s%s,v" "%sRCS/%s"))
|
|
|
|
|
(repeat :tag "User-specified"
|
|
|
|
|
(choice string
|
|
|
|
|
function)))
|
2000-09-07 20:02:38 +00:00
|
|
|
|
:version "21.1"
|
2012-02-25 04:29:09 +00:00
|
|
|
|
:group 'vc-rcs)
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
2007-07-18 16:32:40 +00:00
|
|
|
|
;;; Properties of the backend
|
|
|
|
|
|
2008-05-02 17:47:25 +00:00
|
|
|
|
(defun vc-rcs-revision-granularity () 'file)
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-checkout-model (files)
|
|
|
|
|
"RCS-specific version of `vc-checkout-model'."
|
|
|
|
|
(let ((file (if (consp files) (car files) files))
|
|
|
|
|
result)
|
|
|
|
|
(when vc-consult-headers
|
|
|
|
|
(vc-file-setprop file 'vc-checkout-model nil)
|
|
|
|
|
(vc-rcs-consult-headers file)
|
|
|
|
|
(setq result (vc-file-getprop file 'vc-checkout-model)))
|
|
|
|
|
(or result
|
|
|
|
|
(progn (vc-rcs-fetch-master-state file)
|
|
|
|
|
(vc-file-getprop file 'vc-checkout-model)))))
|
2007-07-18 16:32:40 +00:00
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
;;;
|
|
|
|
|
;;; State-querying functions
|
|
|
|
|
;;;
|
|
|
|
|
|
2008-04-29 15:32:56 +00:00
|
|
|
|
;; The autoload cookie below places vc-rcs-registered directly into
|
|
|
|
|
;; loaddefs.el, so that vc-rcs.el does not need to be loaded for
|
|
|
|
|
;; every file that is visited.
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(progn
|
2014-11-22 11:03:57 +00:00
|
|
|
|
(defun vc-rcs-registered (f) (vc-default-registered 'RCS f)))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
|
|
|
|
(defun vc-rcs-state (file)
|
|
|
|
|
"Implementation of `vc-state' for RCS."
|
2008-05-02 03:48:17 +00:00
|
|
|
|
(if (not (vc-rcs-registered file))
|
2008-05-01 19:13:16 +00:00
|
|
|
|
'unregistered
|
|
|
|
|
(or (boundp 'vc-rcs-headers-result)
|
|
|
|
|
(and vc-consult-headers
|
|
|
|
|
(vc-rcs-consult-headers file)))
|
|
|
|
|
(let ((state
|
|
|
|
|
;; vc-working-revision might not be known; in that case the
|
|
|
|
|
;; property is nil. vc-rcs-fetch-master-state knows how to
|
|
|
|
|
;; handle that.
|
|
|
|
|
(vc-rcs-fetch-master-state file
|
|
|
|
|
(vc-file-getprop file
|
|
|
|
|
'vc-working-revision))))
|
|
|
|
|
(if (not (eq state 'up-to-date))
|
|
|
|
|
state
|
2014-12-01 13:24:27 +00:00
|
|
|
|
(if (vc-rcs-workfile-unchanged-p file)
|
2008-05-01 19:13:16 +00:00
|
|
|
|
'up-to-date
|
2008-05-02 17:47:25 +00:00
|
|
|
|
(if (eq (vc-rcs-checkout-model (list file)) 'locking)
|
2008-05-01 19:13:16 +00:00
|
|
|
|
'unlocked-changes
|
|
|
|
|
'edited))))))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
Silence some vc compilation warnings
* lisp/vc/vc-arch.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-bzr.el: No need to require vc when compiling.
(vc-exec-after, vc-set-async-update, vc-default-dir-printer)
(vc-resynch-buffer, vc-dir-refresh): Declare.
(vc-setup-buffer, vc-switches): Autoload.
* lisp/vc/vc-dir.el (desktop-missing-file-warning): Declare.
* lisp/vc/vc-mtn.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-rcs.el (vc-expand-dirs, vc-switches)
(vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload.
(vc-file-tree-walk): Declare.
* lisp/vc/vc-svn.el (vc-exec-after): Declare.
(vc-switches, vc-setup-buffer): Autoload.
* lisp/obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert):
Autoload.
(vc-resynch-buffer): Declare.
2013-05-28 07:01:59 +00:00
|
|
|
|
(autoload 'vc-expand-dirs "vc")
|
|
|
|
|
|
2014-12-02 15:10:55 +00:00
|
|
|
|
(defun vc-rcs-dir-status-files (dir files update-function)
|
|
|
|
|
(if (not files) (setq files (vc-expand-dirs (list dir) 'RCS)))
|
|
|
|
|
(let ((result nil))
|
|
|
|
|
(dolist (file files)
|
2008-04-05 00:15:13 +00:00
|
|
|
|
(let ((state (vc-state file))
|
|
|
|
|
(frel (file-relative-name file)))
|
2008-05-10 03:58:11 +00:00
|
|
|
|
(when (and (eq (vc-backend file) 'RCS)
|
|
|
|
|
(not (eq state 'up-to-date)))
|
|
|
|
|
(push (list frel state) result))))
|
2008-04-11 15:17:59 +00:00
|
|
|
|
(funcall update-function result)))
|
2008-04-05 00:15:13 +00:00
|
|
|
|
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(defun vc-rcs-working-revision (file)
|
|
|
|
|
"RCS-specific version of `vc-working-revision'."
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(or (and vc-consult-headers
|
|
|
|
|
(vc-rcs-consult-headers file)
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(vc-file-getprop file 'vc-working-revision))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(progn
|
|
|
|
|
(vc-rcs-fetch-master-state file)
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(vc-file-getprop file 'vc-working-revision))))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2014-11-26 18:10:26 +00:00
|
|
|
|
(autoload 'vc-master-name "vc-filewise")
|
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(defun vc-rcs-latest-on-branch-p (file &optional version)
|
|
|
|
|
"Return non-nil if workfile version of FILE is the latest on its branch.
|
|
|
|
|
When VERSION is given, perform check for that version."
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(unless version (setq version (vc-working-revision file)))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(string= version
|
2009-08-26 17:54:05 +00:00
|
|
|
|
(if (vc-rcs-trunk-p version)
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(progn
|
|
|
|
|
;; Compare VERSION to the head version number.
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-insert-file (vc-master-name file) "^[0-9]")
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1))
|
|
|
|
|
;; If we are not on the trunk, we need to examine the
|
|
|
|
|
;; whole current branch.
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-insert-file (vc-master-name file) "^desc")
|
2002-01-05 17:21:06 +00:00
|
|
|
|
(vc-rcs-find-most-recent-rev (vc-branch-part version))))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(defun vc-rcs-workfile-unchanged-p (file)
|
2014-12-01 13:24:27 +00:00
|
|
|
|
"Has FILE remained unchanged since last checkout?"
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
;; Try to use rcsdiff --brief. If rcsdiff does not understand that,
|
|
|
|
|
;; do a double take and remember the fact for the future
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(let* ((version (concat "-r" (vc-working-revision file)))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(status (if (eq vc-rcsdiff-knows-brief 'no)
|
2008-05-10 13:27:16 +00:00
|
|
|
|
(vc-do-command "*vc*" 1 "rcsdiff" file version)
|
|
|
|
|
(vc-do-command "*vc*" 2 "rcsdiff" file "--brief" version))))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(if (eq status 2)
|
|
|
|
|
(if (not vc-rcsdiff-knows-brief)
|
|
|
|
|
(setq vc-rcsdiff-knows-brief 'no
|
2008-05-10 13:27:16 +00:00
|
|
|
|
status (vc-do-command "*vc*" 1 "rcsdiff" file version))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(error "rcsdiff failed"))
|
|
|
|
|
(if (not vc-rcsdiff-knows-brief) (setq vc-rcsdiff-knows-brief 'yes)))
|
|
|
|
|
;; The workfile is unchanged if rcsdiff found no differences.
|
|
|
|
|
(zerop status)))
|
|
|
|
|
|
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
;;;
|
|
|
|
|
;;; State-changing functions
|
|
|
|
|
;;;
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(defun vc-rcs-create-repo ()
|
|
|
|
|
"Create a new RCS repository."
|
2008-12-04 07:01:56 +00:00
|
|
|
|
;; RCS is totally file-oriented, so all we have to do is make the directory.
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(make-directory "RCS"))
|
|
|
|
|
|
Silence some vc compilation warnings
* lisp/vc/vc-arch.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-bzr.el: No need to require vc when compiling.
(vc-exec-after, vc-set-async-update, vc-default-dir-printer)
(vc-resynch-buffer, vc-dir-refresh): Declare.
(vc-setup-buffer, vc-switches): Autoload.
* lisp/vc/vc-dir.el (desktop-missing-file-warning): Declare.
* lisp/vc/vc-mtn.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-rcs.el (vc-expand-dirs, vc-switches)
(vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload.
(vc-file-tree-walk): Declare.
* lisp/vc/vc-svn.el (vc-exec-after): Declare.
(vc-switches, vc-setup-buffer): Autoload.
* lisp/obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert):
Autoload.
(vc-resynch-buffer): Declare.
2013-05-28 07:01:59 +00:00
|
|
|
|
(autoload 'vc-switches "vc")
|
|
|
|
|
|
2014-12-01 11:23:10 +00:00
|
|
|
|
(defun vc-rcs-register (files &optional comment)
|
2007-07-18 16:32:40 +00:00
|
|
|
|
"Register FILES into the RCS version-control system.
|
2014-12-10 17:33:26 +00:00
|
|
|
|
Automatically retrieve a read-only version of the file with keywords expanded.
|
2014-12-01 11:23:10 +00:00
|
|
|
|
COMMENT can be used to provide an initial description for each FILES.
|
2008-12-04 07:01:56 +00:00
|
|
|
|
Passes either `vc-rcs-register-switches' or `vc-register-switches'
|
2014-12-10 17:33:26 +00:00
|
|
|
|
to the RCS command."
|
2008-02-24 23:02:59 +00:00
|
|
|
|
(let (subdir name)
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(dolist (file files)
|
2008-02-24 23:02:59 +00:00
|
|
|
|
(and (not (file-exists-p
|
|
|
|
|
(setq subdir (expand-file-name "RCS"
|
|
|
|
|
(file-name-directory file)))))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(not (directory-files (file-name-directory file)
|
|
|
|
|
nil ".*,v$" t))
|
|
|
|
|
(yes-or-no-p "Create RCS subdirectory? ")
|
|
|
|
|
(make-directory subdir))
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(apply #'vc-do-command "*vc*" 0 "ci" file
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
;; if available, use the secure registering option
|
|
|
|
|
(and (vc-rcs-release-p "5.6.4") "-i")
|
2014-12-10 17:33:26 +00:00
|
|
|
|
"-u"
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(and comment (concat "-t-" comment))
|
2003-05-08 19:24:56 +00:00
|
|
|
|
(vc-switches 'RCS 'register))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
;; parse output to find master file name and workfile version
|
|
|
|
|
(with-current-buffer "*vc*"
|
2008-02-24 23:02:59 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (not (setq name
|
|
|
|
|
(if (looking-at (concat "^\\(.*\\) <-- "
|
|
|
|
|
(file-name-nondirectory file)))
|
|
|
|
|
(match-string 1))))
|
|
|
|
|
;; if we couldn't find the master name,
|
|
|
|
|
;; run vc-rcs-registered to get it
|
2014-11-22 05:10:31 +00:00
|
|
|
|
;; (will be stored into the vc-master-name property)
|
2008-02-24 23:02:59 +00:00
|
|
|
|
(vc-rcs-registered file)
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-file-setprop file 'vc-master-name
|
2008-02-24 23:02:59 +00:00
|
|
|
|
(if (file-name-absolute-p name)
|
|
|
|
|
name
|
|
|
|
|
(expand-file-name
|
|
|
|
|
name
|
|
|
|
|
(file-name-directory file))))))
|
|
|
|
|
(vc-file-setprop file 'vc-working-revision
|
|
|
|
|
(if (re-search-forward
|
|
|
|
|
"^initial revision: \\([0-9.]+\\).*\n"
|
|
|
|
|
nil t)
|
|
|
|
|
(match-string 1))))))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(defun vc-rcs-responsible-p (file)
|
|
|
|
|
"Return non-nil if RCS thinks it would be responsible for registering FILE."
|
|
|
|
|
;; TODO: check for all the patterns in vc-rcs-master-templates
|
2011-09-02 07:54:34 +00:00
|
|
|
|
(file-directory-p (expand-file-name "RCS"
|
|
|
|
|
(if (file-directory-p file)
|
|
|
|
|
file
|
|
|
|
|
(file-name-directory file)))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
|
|
|
|
(defun vc-rcs-receive-file (file rev)
|
|
|
|
|
"Implementation of receive-file for RCS."
|
2008-05-02 17:47:25 +00:00
|
|
|
|
(let ((checkout-model (vc-rcs-checkout-model (list file))))
|
2014-12-01 11:23:10 +00:00
|
|
|
|
(vc-rcs-register file "")
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(when (eq checkout-model 'implicit)
|
|
|
|
|
(vc-rcs-set-non-strict-locking file))
|
|
|
|
|
(vc-rcs-set-default-branch file (concat rev ".1"))))
|
|
|
|
|
|
2000-09-21 13:21:41 +00:00
|
|
|
|
(defun vc-rcs-unregister (file)
|
|
|
|
|
"Unregister FILE from RCS.
|
|
|
|
|
If this leaves the RCS subdirectory empty, ask the user
|
|
|
|
|
whether to remove it."
|
2015-03-01 16:51:31 +00:00
|
|
|
|
(unless (memq (vc-state file) '(nil unregistered))
|
|
|
|
|
(let* ((master (vc-master-name file))
|
|
|
|
|
(dir (file-name-directory master))
|
|
|
|
|
(backup-info (find-backup-file-name master)))
|
|
|
|
|
(if (not backup-info)
|
|
|
|
|
(delete-file master)
|
|
|
|
|
(rename-file master (car backup-info) 'ok-if-already-exists)
|
|
|
|
|
(dolist (f (cdr backup-info)) (ignore-errors (delete-file f))))
|
|
|
|
|
(and (string= (file-name-nondirectory (directory-file-name dir)) "RCS")
|
|
|
|
|
;; check whether RCS dir is empty, i.e. it does not
|
|
|
|
|
;; contain any files except "." and ".."
|
|
|
|
|
(not (directory-files dir nil
|
|
|
|
|
"^\\([^.]\\|\\.[^.]\\|\\.\\.[^.]\\).*"))
|
|
|
|
|
(yes-or-no-p (format "Directory %s is empty; remove it? " dir))
|
|
|
|
|
(delete-directory dir)))))
|
2000-09-21 13:21:41 +00:00
|
|
|
|
|
Remove never-used rev argument from VC's backend checkin methods.
Alters vc/vc-arch.el, vc/vc-bzr.el, vc/vc-cvs.el, vc/vc-dav.el,
vc/vc-git.el, vc/vc-hg.el, vc/vc-mtn.el, vc/vc-rcs.el,
vc/vc-sccs.el, vc/vc-svn.el, vc/vc.el.
Only the RCS, SCCS, and CVS back ends tried to do anything with it,
and that code was never exercised. Chiseling away the cruft of
decades...
2014-11-20 07:37:06 +00:00
|
|
|
|
;; It used to be possible to pass in a value for the variable rev, but
|
|
|
|
|
;; nothing in the rest of VC used this capability. Removing it makes the
|
|
|
|
|
;; backend interface simpler for all modes.
|
|
|
|
|
;;
|
|
|
|
|
(defun vc-rcs-checkin (files comment)
|
2000-11-16 18:14:41 +00:00
|
|
|
|
"RCS-specific version of `vc-backend-checkin'."
|
Remove never-used rev argument from VC's backend checkin methods.
Alters vc/vc-arch.el, vc/vc-bzr.el, vc/vc-cvs.el, vc/vc-dav.el,
vc/vc-git.el, vc/vc-hg.el, vc/vc-mtn.el, vc/vc-rcs.el,
vc/vc-sccs.el, vc/vc-svn.el, vc/vc.el.
Only the RCS, SCCS, and CVS back ends tried to do anything with it,
and that code was never exercised. Chiseling away the cruft of
decades...
2014-11-20 07:37:06 +00:00
|
|
|
|
(let (rev (switches (vc-switches 'RCS 'checkin)))
|
2007-07-18 16:32:40 +00:00
|
|
|
|
;; Now operate on the files
|
2014-12-02 09:38:08 +00:00
|
|
|
|
(dolist (file (vc-expand-dirs files 'RCS))
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(let ((old-version (vc-working-revision file)) new-version
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(default-branch (vc-file-getprop file 'vc-rcs-default-branch)))
|
|
|
|
|
;; Force branch creation if an appropriate
|
|
|
|
|
;; default branch has been set.
|
Remove never-used rev argument from VC's backend checkin methods.
Alters vc/vc-arch.el, vc/vc-bzr.el, vc/vc-cvs.el, vc/vc-dav.el,
vc/vc-git.el, vc/vc-hg.el, vc/vc-mtn.el, vc/vc-rcs.el,
vc/vc-sccs.el, vc/vc-svn.el, vc/vc.el.
Only the RCS, SCCS, and CVS back ends tried to do anything with it,
and that code was never exercised. Chiseling away the cruft of
decades...
2014-11-20 07:37:06 +00:00
|
|
|
|
(and default-branch
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(string-match (concat "^" (regexp-quote old-version) "\\.")
|
|
|
|
|
default-branch)
|
|
|
|
|
(setq rev default-branch)
|
|
|
|
|
(setq switches (cons "-f" switches)))
|
Remove never-used rev argument from VC's backend checkin methods.
Alters vc/vc-arch.el, vc/vc-bzr.el, vc/vc-cvs.el, vc/vc-dav.el,
vc/vc-git.el, vc/vc-hg.el, vc/vc-mtn.el, vc/vc-rcs.el,
vc/vc-sccs.el, vc/vc-svn.el, vc/vc.el.
Only the RCS, SCCS, and CVS back ends tried to do anything with it,
and that code was never exercised. Chiseling away the cruft of
decades...
2014-11-20 07:37:06 +00:00
|
|
|
|
(if old-version
|
|
|
|
|
(setq rev (vc-branch-part old-version))
|
|
|
|
|
(error "can't find current branch"))
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file)
|
2007-07-18 16:32:40 +00:00
|
|
|
|
;; if available, use the secure check-in option
|
|
|
|
|
(and (vc-rcs-release-p "5.6.4") "-j")
|
2014-12-10 17:33:26 +00:00
|
|
|
|
(concat "-u" rev)
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(concat "-m" comment)
|
|
|
|
|
switches)
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(vc-file-setprop file 'vc-working-revision nil)
|
2007-07-18 16:32:40 +00:00
|
|
|
|
|
|
|
|
|
;; determine the new workfile version
|
|
|
|
|
(set-buffer "*vc*")
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(when (or (re-search-forward
|
|
|
|
|
"new revision: \\([0-9.]+\\);" nil t)
|
|
|
|
|
(re-search-forward
|
|
|
|
|
"reverting to previous revision \\([0-9.]+\\)" nil t))
|
|
|
|
|
(setq new-version (match-string 1))
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(vc-file-setprop file 'vc-working-revision new-version))
|
2007-07-18 16:32:40 +00:00
|
|
|
|
|
|
|
|
|
;; if we got to a different branch, adjust the default
|
|
|
|
|
;; branch accordingly
|
|
|
|
|
(cond
|
|
|
|
|
((and old-version new-version
|
|
|
|
|
(not (string= (vc-branch-part old-version)
|
|
|
|
|
(vc-branch-part new-version))))
|
|
|
|
|
(vc-rcs-set-default-branch file
|
2009-08-26 17:54:05 +00:00
|
|
|
|
(if (vc-rcs-trunk-p new-version) nil
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(vc-branch-part new-version)))
|
2011-03-03 07:52:10 +00:00
|
|
|
|
;; If this is an old (pre-1992!) RCS release, we might have
|
2007-07-18 16:32:40 +00:00
|
|
|
|
;; to remove a remaining lock.
|
|
|
|
|
(if (not (vc-rcs-release-p "5.6.2"))
|
|
|
|
|
;; exit status of 1 is also accepted.
|
|
|
|
|
;; It means that the lock was removed before.
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-do-command "*vc*" 1 "rcs" (vc-master-name file)
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(concat "-u" old-version)))))))))
|
2000-10-03 11:33:59 +00:00
|
|
|
|
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(defun vc-rcs-find-revision (file rev buffer)
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(apply #'vc-do-command
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(or buffer "*vc*") 0 "co" (vc-master-name file)
|
2002-10-08 15:33:18 +00:00
|
|
|
|
"-q" ;; suppress diagnostic output
|
|
|
|
|
(concat "-p" rev)
|
2003-05-08 19:24:56 +00:00
|
|
|
|
(vc-switches 'RCS 'checkout)))
|
2002-10-08 15:33:18 +00:00
|
|
|
|
|
2014-11-20 08:52:24 +00:00
|
|
|
|
(defun vc-rcs-checkout (file &optional rev)
|
2008-09-15 23:28:39 +00:00
|
|
|
|
"Retrieve a copy of a saved version of FILE. If FILE is a directory,
|
2008-05-09 17:51:39 +00:00
|
|
|
|
attempt the checkout for all registered files beneath it."
|
|
|
|
|
(if (file-directory-p file)
|
2014-12-02 09:38:08 +00:00
|
|
|
|
(mapc 'vc-rcs-checkout (vc-expand-dirs (list file) 'RCS))
|
2008-05-09 17:51:39 +00:00
|
|
|
|
(let ((file-buffer (get-file-buffer file))
|
|
|
|
|
switches)
|
|
|
|
|
(message "Checking out %s..." file)
|
|
|
|
|
(save-excursion
|
|
|
|
|
;; Change buffers to get local value of vc-checkout-switches.
|
|
|
|
|
(if file-buffer (set-buffer file-buffer))
|
|
|
|
|
(setq switches (vc-switches 'RCS 'checkout))
|
|
|
|
|
;; Save this buffer's default-directory
|
|
|
|
|
;; and use save-excursion to make sure it is restored
|
|
|
|
|
;; in the same buffer it was saved in.
|
|
|
|
|
(let ((default-directory default-directory))
|
|
|
|
|
(save-excursion
|
|
|
|
|
;; Adjust the default-directory so that the check-out creates
|
|
|
|
|
;; the file in the right place.
|
|
|
|
|
(setq default-directory (file-name-directory file))
|
|
|
|
|
(let (new-version)
|
|
|
|
|
;; if we should go to the head of the trunk,
|
|
|
|
|
;; clear the default branch first
|
|
|
|
|
(and rev (string= rev "")
|
|
|
|
|
(vc-rcs-set-default-branch file nil))
|
|
|
|
|
;; now do the checkout
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(apply #'vc-do-command
|
2014-11-22 05:10:31 +00:00
|
|
|
|
"*vc*" 0 "co" (vc-master-name file)
|
2008-05-09 17:51:39 +00:00
|
|
|
|
;; If locking is not strict, force to overwrite
|
|
|
|
|
;; the writable workfile.
|
|
|
|
|
(if (eq (vc-rcs-checkout-model (list file)) 'implicit) "-f")
|
2014-11-20 08:52:24 +00:00
|
|
|
|
"-l"
|
2008-05-09 17:51:39 +00:00
|
|
|
|
(if (stringp rev)
|
|
|
|
|
;; a literal revision was specified
|
|
|
|
|
(concat "-r" rev)
|
|
|
|
|
(let ((workrev (vc-working-revision file)))
|
|
|
|
|
(if workrev
|
|
|
|
|
(concat "-r"
|
|
|
|
|
(if (not rev)
|
|
|
|
|
;; no revision specified:
|
|
|
|
|
;; use current workfile version
|
|
|
|
|
workrev
|
|
|
|
|
;; REV is t ...
|
2009-08-26 17:54:05 +00:00
|
|
|
|
(if (not (vc-rcs-trunk-p workrev))
|
2008-05-09 17:51:39 +00:00
|
|
|
|
;; ... go to head of current branch
|
|
|
|
|
(vc-branch-part workrev)
|
|
|
|
|
;; ... go to head of trunk
|
|
|
|
|
(vc-rcs-set-default-branch file
|
2002-12-26 14:06:33 +00:00
|
|
|
|
nil)
|
|
|
|
|
""))))))
|
2002-10-08 15:33:18 +00:00
|
|
|
|
switches)
|
|
|
|
|
;; determine the new workfile version
|
|
|
|
|
(with-current-buffer "*vc*"
|
|
|
|
|
(setq new-version
|
|
|
|
|
(vc-parse-buffer "^revision \\([0-9.]+\\).*\n" 1)))
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(vc-file-setprop file 'vc-working-revision new-version)
|
2002-10-08 15:33:18 +00:00
|
|
|
|
;; if necessary, adjust the default branch
|
|
|
|
|
(and rev (not (string= rev ""))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(vc-rcs-set-default-branch
|
2002-10-08 15:33:18 +00:00
|
|
|
|
file
|
|
|
|
|
(if (vc-rcs-latest-on-branch-p file new-version)
|
2009-08-26 17:54:05 +00:00
|
|
|
|
(if (vc-rcs-trunk-p new-version) nil
|
2002-10-08 15:33:18 +00:00
|
|
|
|
(vc-branch-part new-version))
|
|
|
|
|
new-version)))))
|
2008-05-09 17:51:39 +00:00
|
|
|
|
(message "Checking out %s...done" file))))))
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
|
* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
(vc-do-command, vc-set-async-update):
* lisp/vc/vc-mtn.el (vc-mtn-dir-status):
* lisp/vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
(vc-hg-pull, vc-hg-merge-branch):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
(vc-git-merge-branch):
* lisp/vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
(vc-cvs-dir-status-files):
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
(vc-bzr-dir-status-files):
* lisp/vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
* lisp/vc/vc-annotate.el: Use lexical-binding.
(vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
(vc-annotate): Don't use `goto-line'.
* lisp/vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
(vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
* lisp/vc/vc-svn.el: Use lexical-binding.
(vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
* lisp/vc/vc-sccs.el:
* lisp/vc/vc-rcs.el: Use lexical-binding.
2013-09-04 21:09:42 +00:00
|
|
|
|
(defun vc-rcs-revert (file &optional _contents-done)
|
2008-05-16 08:32:57 +00:00
|
|
|
|
"Revert FILE to the version it was based on. If FILE is a directory,
|
2008-05-09 17:51:39 +00:00
|
|
|
|
revert all registered files beneath it."
|
|
|
|
|
(if (file-directory-p file)
|
2014-12-02 09:38:08 +00:00
|
|
|
|
(mapc 'vc-rcs-revert (vc-expand-dirs (list file) 'RCS))
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f"
|
2008-05-09 17:51:39 +00:00
|
|
|
|
(concat (if (eq (vc-state file) 'edited) "-u" "-r")
|
|
|
|
|
(vc-working-revision file)))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
2014-12-01 16:41:45 +00:00
|
|
|
|
(defun vc-rcs-merge-file (file)
|
|
|
|
|
"Accept a file merge request, prompting for revisions."
|
|
|
|
|
(let* ((first-revision
|
|
|
|
|
(vc-read-revision
|
|
|
|
|
(concat "Merge " file " from branch or revision: ")
|
|
|
|
|
(list file)
|
|
|
|
|
'RCS))
|
|
|
|
|
second-revision)
|
|
|
|
|
(cond
|
|
|
|
|
((string= first-revision "")
|
|
|
|
|
(error "A starting RCS revision is required"))
|
|
|
|
|
(t
|
|
|
|
|
(if (not (vc-branch-p first-revision))
|
|
|
|
|
(setq second-revision
|
|
|
|
|
(vc-read-revision
|
|
|
|
|
"Second RCS revision: "
|
|
|
|
|
(list file) 'RCS nil
|
|
|
|
|
(concat (vc-branch-part first-revision) ".")))
|
|
|
|
|
;; We want to merge an entire branch. Set revisions
|
|
|
|
|
;; accordingly, so that vc-rcs-merge understands us.
|
|
|
|
|
(setq second-revision first-revision)
|
|
|
|
|
;; first-revision must be the starting point of the branch
|
|
|
|
|
(setq first-revision (vc-branch-part first-revision)))))
|
|
|
|
|
(vc-rcs-merge file first-revision second-revision)))
|
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(defun vc-rcs-merge (file first-version &optional second-version)
|
|
|
|
|
"Merge changes into current working copy of FILE.
|
|
|
|
|
The changes are between FIRST-VERSION and SECOND-VERSION."
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-do-command "*vc*" 1 "rcsmerge" (vc-master-name file)
|
2000-11-16 18:14:41 +00:00
|
|
|
|
"-kk" ; ignore keyword conflicts
|
|
|
|
|
(concat "-r" first-version)
|
|
|
|
|
(if second-version (concat "-r" second-version))))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-steal-lock (file &optional rev)
|
|
|
|
|
"Steal the lock on the current workfile for FILE and revision REV.
|
2008-09-15 23:28:39 +00:00
|
|
|
|
If FILE is a directory, steal the lock on all registered files beneath it.
|
2000-11-16 18:14:41 +00:00
|
|
|
|
Needs RCS 5.6.2 or later for -M."
|
2008-05-09 17:51:39 +00:00
|
|
|
|
(if (file-directory-p file)
|
2014-12-02 09:38:08 +00:00
|
|
|
|
(mapc 'vc-rcs-steal-lock (vc-expand-dirs (list file) 'RCS))
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-do-command "*vc*" 0 "rcs" (vc-master-name file) "-M" (concat "-u" rev))
|
2008-05-09 17:51:39 +00:00
|
|
|
|
;; Do a real checkout after stealing the lock, so that we see
|
|
|
|
|
;; expanded headers.
|
2014-12-02 04:49:35 +00:00
|
|
|
|
(vc-do-command "*vc*" 0 "co" (vc-master-name file) "-f" (concat "-l" rev))
|
|
|
|
|
;; Must clear any headers here because they wouldn't
|
|
|
|
|
;; show that the file is locked now.
|
|
|
|
|
(let* ((filename (or file buffer-file-name))
|
|
|
|
|
(visited (find-buffer-visiting filename)))
|
|
|
|
|
(if visited
|
|
|
|
|
(let ((context (vc-buffer-context)))
|
|
|
|
|
;; save-excursion may be able to relocate point and mark
|
|
|
|
|
;; properly. If it fails, vc-restore-buffer-context
|
|
|
|
|
;; will give it a second try.
|
|
|
|
|
(save-excursion
|
|
|
|
|
(vc-rcs-clear-headers))
|
|
|
|
|
(vc-restore-buffer-context context))
|
|
|
|
|
(set-buffer (find-file-noselect filename))
|
|
|
|
|
(vc-rcs-clear-headers)
|
|
|
|
|
(kill-buffer filename)))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
2007-12-27 11:26:27 +00:00
|
|
|
|
(defun vc-rcs-modify-change-comment (files rev comment)
|
2008-05-09 17:51:39 +00:00
|
|
|
|
"Modify the change comments change on FILES on a specified REV. If FILE is a
|
|
|
|
|
directory the operation is applied to all registered files beneath it."
|
2014-12-02 09:38:08 +00:00
|
|
|
|
(dolist (file (vc-expand-dirs files 'RCS))
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-do-command "*vc*" 0 "rcs" (vc-master-name file)
|
2008-04-08 15:59:35 +00:00
|
|
|
|
(concat "-m" rev ":" comment))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; History functions
|
|
|
|
|
;;;
|
|
|
|
|
|
2009-08-29 18:56:12 +00:00
|
|
|
|
(defun vc-rcs-print-log-cleanup ()
|
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(forward-line -1)
|
|
|
|
|
(while (looking-at "=*\n")
|
|
|
|
|
(delete-char (- (match-end 0) (match-beginning 0)))
|
|
|
|
|
(forward-line -1))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(when (looking-at "[\b\t\n\v\f\r ]+")
|
|
|
|
|
(delete-char (- (match-end 0) (match-beginning 0))))))
|
|
|
|
|
|
* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
(vc-do-command, vc-set-async-update):
* lisp/vc/vc-mtn.el (vc-mtn-dir-status):
* lisp/vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
(vc-hg-pull, vc-hg-merge-branch):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
(vc-git-merge-branch):
* lisp/vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
(vc-cvs-dir-status-files):
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
(vc-bzr-dir-status-files):
* lisp/vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
* lisp/vc/vc-annotate.el: Use lexical-binding.
(vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
(vc-annotate): Don't use `goto-line'.
* lisp/vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
(vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
* lisp/vc/vc-svn.el: Use lexical-binding.
(vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
* lisp/vc/vc-sccs.el:
* lisp/vc/vc-rcs.el: Use lexical-binding.
2013-09-04 21:09:42 +00:00
|
|
|
|
(defun vc-rcs-print-log (files buffer &optional _shortlog
|
|
|
|
|
_start-revision-ignored limit)
|
2013-04-24 07:52:00 +00:00
|
|
|
|
"Print commit log associated with FILES into specified BUFFER.
|
|
|
|
|
Remaining arguments are ignored.
|
|
|
|
|
If FILE is a directory the operation is applied to all registered
|
|
|
|
|
files beneath it."
|
|
|
|
|
(vc-do-command (or buffer "*vc*") 0 "rlog"
|
2014-12-02 09:38:08 +00:00
|
|
|
|
(mapcar 'vc-master-name (vc-expand-dirs files 'RCS)))
|
2009-08-29 18:56:12 +00:00
|
|
|
|
(with-current-buffer (or buffer "*vc*")
|
2009-11-16 20:36:06 +00:00
|
|
|
|
(vc-rcs-print-log-cleanup))
|
|
|
|
|
(when limit 'limit-unsupported))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
2014-12-14 10:49:08 +00:00
|
|
|
|
(defun vc-rcs-diff (files &optional oldvers newvers buffer async)
|
2007-07-18 16:32:40 +00:00
|
|
|
|
"Get a difference report using RCS between two sets of files."
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(apply #'vc-do-command (or buffer "*vc-diff*")
|
2014-12-01 22:56:41 +00:00
|
|
|
|
(if async 'async 1)
|
2014-12-02 09:38:08 +00:00
|
|
|
|
"rcsdiff" (vc-expand-dirs files 'RCS)
|
2001-02-01 15:11:05 +00:00
|
|
|
|
(append (list "-q"
|
2007-07-18 16:32:40 +00:00
|
|
|
|
(and oldvers (concat "-r" oldvers))
|
2001-02-01 15:11:05 +00:00
|
|
|
|
(and newvers (concat "-r" newvers)))
|
2003-05-08 19:24:56 +00:00
|
|
|
|
(vc-switches 'RCS 'diff))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
2013-10-04 23:47:00 +00:00
|
|
|
|
(defun vc-rcs-find-admin-dir (file)
|
|
|
|
|
"Return the administrative directory of FILE."
|
|
|
|
|
(vc-find-root file "RCS"))
|
|
|
|
|
|
2008-05-09 17:30:49 +00:00
|
|
|
|
(defun vc-rcs-comment-history (file)
|
|
|
|
|
"Return a string with all log entries stored in BACKEND for FILE."
|
|
|
|
|
(with-current-buffer "*vc*"
|
|
|
|
|
;; Has to be written this way, this function is used by the CVS backend too
|
|
|
|
|
(vc-call-backend (vc-backend file) 'print-log (list file))
|
|
|
|
|
;; Remove cruft
|
|
|
|
|
(let ((separator (concat "^-+\nrevision [0-9.]+\ndate: .*\n"
|
|
|
|
|
"\\(branches: .*;\n\\)?"
|
|
|
|
|
"\\(\\*\\*\\* empty log message \\*\\*\\*\n\\)?")))
|
|
|
|
|
(goto-char (point-max)) (forward-line -1)
|
|
|
|
|
(while (looking-at "=*\n")
|
|
|
|
|
(delete-char (- (match-end 0) (match-beginning 0)))
|
|
|
|
|
(forward-line -1))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (looking-at "[\b\t\n\v\f\r ]+")
|
|
|
|
|
(delete-char (- (match-end 0) (match-beginning 0))))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(re-search-forward separator nil t)
|
|
|
|
|
(delete-region (point-min) (point))
|
|
|
|
|
(while (re-search-forward separator nil t)
|
|
|
|
|
(delete-region (match-beginning 0) (match-end 0))))
|
|
|
|
|
;; Return the de-crufted comment list
|
|
|
|
|
(buffer-string)))
|
2007-07-18 16:32:40 +00:00
|
|
|
|
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(defun vc-rcs-annotate-command (file buffer &optional revision)
|
|
|
|
|
"Annotate FILE, inserting the results in BUFFER.
|
|
|
|
|
Optional arg REVISION is a revision to annotate from."
|
2004-12-29 01:56:13 +00:00
|
|
|
|
(vc-setup-buffer buffer)
|
2004-11-19 15:08:32 +00:00
|
|
|
|
;; Aside from the "head revision on the trunk", the instructions for
|
|
|
|
|
;; each revision on the trunk are an ordered list of kill and insert
|
|
|
|
|
;; commands necessary to go from the chronologically-following
|
|
|
|
|
;; revision to this one. That is, associated with revision N are
|
|
|
|
|
;; edits that applied to revision N+1 would result in revision N.
|
|
|
|
|
;;
|
|
|
|
|
;; On a branch, however, (some) things are inverted: the commands
|
|
|
|
|
;; listed are those necessary to go from the chronologically-preceding
|
|
|
|
|
;; revision to this one. That is, associated with revision N are
|
|
|
|
|
;; edits that applied to revision N-1 would result in revision N.
|
|
|
|
|
;;
|
|
|
|
|
;; So, to get per-line history info, we apply reverse-chronological
|
|
|
|
|
;; edits, starting with the head revision on the trunk, all the way
|
|
|
|
|
;; back through the initial revision (typically "1.1" or similar),
|
|
|
|
|
;; then apply forward-chronological edits -- keeping track of which
|
|
|
|
|
;; revision is associated with each inserted line -- until we reach
|
|
|
|
|
;; the desired revision for display (which may be either on the trunk
|
|
|
|
|
;; or on a branch).
|
|
|
|
|
(let* ((tree (with-temp-buffer
|
|
|
|
|
(insert-file-contents (vc-rcs-registered file))
|
|
|
|
|
(vc-rcs-parse)))
|
|
|
|
|
(revisions (cdr (assq 'revisions tree)))
|
|
|
|
|
;; The revision N whose instructions we currently are processing.
|
|
|
|
|
(cur (cdr (assq 'head (cdr (assq 'headers tree)))))
|
|
|
|
|
;; Alist from the parse tree for N.
|
|
|
|
|
(meta (cdr (assoc cur revisions)))
|
|
|
|
|
;; Point and temporary string, respectively.
|
|
|
|
|
p s
|
|
|
|
|
;; "Next-branch list". Nil means the desired revision to
|
|
|
|
|
;; display lives on the trunk. Non-nil means it lives on a
|
|
|
|
|
;; branch, in which case the value is a list of revision pairs
|
|
|
|
|
;; (PARENT . CHILD), the first PARENT being on the trunk, that
|
|
|
|
|
;; links each series of revisions in the path from the initial
|
|
|
|
|
;; revision to the desired revision to display.
|
|
|
|
|
nbls
|
|
|
|
|
;; "Path-accumulate-predicate plus revision/date/author".
|
|
|
|
|
;; Until set, forward-chronological edits are not accumulated.
|
|
|
|
|
;; Once set, its value (updated every revision) is used for
|
|
|
|
|
;; the text property `:vc-rcs-r/d/a' for inserts during
|
|
|
|
|
;; processing of forward-chronological instructions for N.
|
|
|
|
|
;; See internal func `r/d/a'.
|
|
|
|
|
prda
|
|
|
|
|
;; List of forward-chronological instructions, each of the
|
|
|
|
|
;; form: (POS . ACTION), where POS is a buffer position. If
|
|
|
|
|
;; ACTION is a string, it is inserted, otherwise it is taken as
|
|
|
|
|
;; the number of characters to be deleted.
|
|
|
|
|
path
|
|
|
|
|
;; N+1. When `cur' is "", this is the initial revision.
|
|
|
|
|
pre)
|
|
|
|
|
(unless revision
|
|
|
|
|
(setq revision cur))
|
|
|
|
|
(unless (assoc revision revisions)
|
|
|
|
|
(error "No such revision: %s" revision))
|
|
|
|
|
;; Find which branches (if any) must be included in the edits.
|
|
|
|
|
(let ((par revision)
|
|
|
|
|
bpt kids)
|
|
|
|
|
(while (setq bpt (vc-branch-part par)
|
|
|
|
|
par (vc-branch-part bpt))
|
|
|
|
|
(setq kids (cdr (assq 'branches (cdr (assoc par revisions)))))
|
|
|
|
|
;; A branchpoint may have multiple children. Find the right one.
|
|
|
|
|
(while (not (string= bpt (vc-branch-part (car kids))))
|
|
|
|
|
(setq kids (cdr kids)))
|
|
|
|
|
(push (cons par (car kids)) nbls)))
|
|
|
|
|
;; Start with the full text.
|
|
|
|
|
(set-buffer buffer)
|
|
|
|
|
(insert (cdr (assq 'text meta)))
|
|
|
|
|
;; Apply reverse-chronological edits on the trunk, computing and
|
|
|
|
|
;; accumulating forward-chronological edits after some point, for
|
|
|
|
|
;; later.
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(cl-flet ((r/d/a () (vector pre
|
|
|
|
|
(cdr (assq 'date meta))
|
|
|
|
|
(cdr (assq 'author meta)))))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(while (when (setq pre cur cur (cdr (assq 'next meta)))
|
|
|
|
|
(not (string= "" cur)))
|
|
|
|
|
(setq
|
|
|
|
|
;; Start accumulating the forward-chronological edits when N+1
|
|
|
|
|
;; on the trunk is either the desired revision to display, or
|
|
|
|
|
;; the appropriate branchpoint for it. Do this before
|
|
|
|
|
;; updating `meta' since `r/d/a' uses N+1's `meta' value.
|
|
|
|
|
prda (when (or prda (string= (if nbls (caar nbls) revision) pre))
|
|
|
|
|
(r/d/a))
|
|
|
|
|
meta (cdr (assoc cur revisions)))
|
|
|
|
|
;; Edits in the parse tree specify a line number (in the buffer
|
|
|
|
|
;; *BEFORE* editing occurs) to start from, but line numbers
|
|
|
|
|
;; change as a result of edits. To DTRT, we apply edits in
|
|
|
|
|
;; order of descending buffer position so that edits further
|
|
|
|
|
;; down in the buffer occur first w/o corrupting specified
|
|
|
|
|
;; buffer positions of edits occurring towards the beginning of
|
|
|
|
|
;; the buffer. In this way we avoid using markers. A pleasant
|
|
|
|
|
;; property of this approach is ability to push instructions
|
|
|
|
|
;; onto `path' directly, w/o need to maintain rev boundaries.
|
|
|
|
|
(dolist (insn (cdr (assq :insn meta)))
|
2009-09-04 02:49:07 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- (pop insn)))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(setq p (point))
|
More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 23:13:41 +00:00
|
|
|
|
(pcase (pop insn)
|
|
|
|
|
(`k (setq s (buffer-substring-no-properties
|
|
|
|
|
p (progn (forward-line (car insn))
|
|
|
|
|
(point))))
|
|
|
|
|
(when prda
|
|
|
|
|
(push `(,p . ,(propertize s :vc-rcs-r/d/a prda)) path))
|
|
|
|
|
(delete-region p (point)))
|
|
|
|
|
(`i (setq s (car insn))
|
|
|
|
|
(when prda
|
|
|
|
|
(push `(,p . ,(length s)) path))
|
|
|
|
|
(insert s)))))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
;; For the initial revision, setting `:vc-rcs-r/d/a' directly is
|
|
|
|
|
;; equivalent to pushing an insert instruction (of the entire buffer
|
|
|
|
|
;; contents) onto `path' then erasing the buffer, but less wasteful.
|
|
|
|
|
(put-text-property (point-min) (point-max) :vc-rcs-r/d/a (r/d/a))
|
|
|
|
|
;; Now apply the forward-chronological edits for the trunk.
|
|
|
|
|
(dolist (insn path)
|
|
|
|
|
(goto-char (pop insn))
|
|
|
|
|
(if (stringp insn)
|
|
|
|
|
(insert insn)
|
|
|
|
|
(delete-char insn)))
|
|
|
|
|
;; Now apply the forward-chronological edits (directly from the
|
|
|
|
|
;; parse-tree) for the branch(es), if necessary. We re-use vars
|
|
|
|
|
;; `pre' and `meta' for the sake of internal func `r/d/a'.
|
|
|
|
|
(while nbls
|
|
|
|
|
(setq pre (cdr (pop nbls)))
|
|
|
|
|
(while (progn
|
|
|
|
|
(setq meta (cdr (assoc pre revisions))
|
|
|
|
|
prda nil)
|
|
|
|
|
(dolist (insn (cdr (assq :insn meta)))
|
2009-09-04 02:49:07 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(forward-line (1- (pop insn)))
|
More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 23:13:41 +00:00
|
|
|
|
(pcase (pop insn)
|
|
|
|
|
(`k (delete-region
|
|
|
|
|
(point) (progn (forward-line (car insn))
|
|
|
|
|
(point))))
|
|
|
|
|
(`i (insert (propertize
|
|
|
|
|
(car insn)
|
|
|
|
|
:vc-rcs-r/d/a
|
|
|
|
|
(or prda (setq prda (r/d/a))))))))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(prog1 (not (string= (if nbls (caar nbls) revision) pre))
|
|
|
|
|
(setq pre (cdr (assq 'next meta)))))))))
|
|
|
|
|
;; Lastly, for each line, insert at bol nicely-formatted history info.
|
|
|
|
|
;; We do two passes to collect summary information used to minimize
|
|
|
|
|
;; the annotation's usage of screen real-estate: (1) Consider rendered
|
|
|
|
|
;; width of revision plus author together as a unit; and (2) Omit
|
|
|
|
|
;; author entirely if all authors are the same as the user.
|
|
|
|
|
(let ((ht (make-hash-table :test 'eq))
|
|
|
|
|
(me (user-login-name))
|
|
|
|
|
(maxw 0)
|
|
|
|
|
(all-me t)
|
|
|
|
|
rda w a)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(while (not (bobp))
|
|
|
|
|
(forward-line -1)
|
|
|
|
|
(setq rda (get-text-property (point) :vc-rcs-r/d/a))
|
|
|
|
|
(unless (gethash rda ht)
|
|
|
|
|
(setq a (aref rda 2)
|
|
|
|
|
all-me (and all-me (string= a me)))
|
|
|
|
|
(puthash rda (setq w (+ (length (aref rda 0))
|
|
|
|
|
(length a)))
|
|
|
|
|
ht)
|
|
|
|
|
(setq maxw (max w maxw))))
|
|
|
|
|
(let ((padding (make-string maxw 32)))
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(cl-flet ((pad (w) (substring-no-properties padding w))
|
|
|
|
|
(render (rda &rest ls)
|
|
|
|
|
(propertize
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(apply #'concat
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(format-time-string "%Y-%m-%d" (aref rda 1))
|
|
|
|
|
" "
|
|
|
|
|
(aref rda 0)
|
|
|
|
|
ls)
|
|
|
|
|
:vc-annotate-prefix t
|
|
|
|
|
:vc-rcs-r/d/a rda)))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(maphash
|
|
|
|
|
(if all-me
|
|
|
|
|
(lambda (rda w)
|
|
|
|
|
(puthash rda (render rda (pad w) ": ") ht))
|
|
|
|
|
(lambda (rda w)
|
|
|
|
|
(puthash rda (render rda " " (pad w) " " (aref rda 2) ": ") ht)))
|
|
|
|
|
ht)))
|
|
|
|
|
(while (not (eobp))
|
|
|
|
|
(insert (gethash (get-text-property (point) :vc-rcs-r/d/a) ht))
|
|
|
|
|
(forward-line 1))))
|
|
|
|
|
|
2015-05-01 00:06:15 +00:00
|
|
|
|
(declare-function vc-annotate-convert-time "vc-annotate" (&optional time))
|
2008-06-24 02:41:04 +00:00
|
|
|
|
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(defun vc-rcs-annotate-current-time ()
|
|
|
|
|
"Return the current time, based at midnight of the current day, and
|
|
|
|
|
encoded as fractional days."
|
|
|
|
|
(vc-annotate-convert-time
|
Simplify use of current-time and friends.
* doc/misc/org.texi (Dynamic blocks):
* lisp/allout-widgets.el (allout-widgets-hook-error-handler):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/icalendar.el (icalendar--convert-float-to-ical):
* lisp/calendar/timeclock.el (timeclock-in, timeclock-when-to-leave)
(timeclock-last-period, timeclock-day-base):
* lisp/eshell/em-ls.el (eshell-ls-file):
* lisp/eshell/esh-util.el (eshell-parse-ange-ls):
* lisp/generic-x.el (named-database-print-serial):
* lisp/net/newst-backend.el (newsticker--get-news-by-url-callback)
(newsticker-get-news, newsticker--sentinel-work)
(newsticker--image-get, newsticker--image-sentinel):
* lisp/net/tramp-sh.el (tramp-get-remote-touch):
* lisp/progmodes/opascal.el (opascal-debug-log):
* lisp/textmodes/remember.el (remember-mail-date)
(remember-store-in-files):
* lisp/vc/vc-annotate.el (vc-annotate-display-autoscale)
(vc-default-annotate-current-time):
* lisp/vc/vc-bzr.el (vc-bzr-shelve-snapshot):
* lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time):
* lisp/vc/vc-rcs.el (vc-rcs-annotate-current-time):
* lisp/url/url-util.el (url-get-normalized-date):
* lisp/erc/erc-backend.el (TOPIC):
* lisp/gnus/gnus-delay.el (gnus-delay-article):
* lisp/gnus/gnus-sum.el (gnus-summary-read-document):
* lisp/gnus/gnus-util.el (gnus-seconds-today, gnus-seconds-month):
* lisp/gnus/message.el (message-make-expires-date):
* lisp/org/org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling):
* lisp/org/org-clock.el (org-resolve-clocks, org-clock-get-sum-start)
(org-clock-special-range):
* lisp/org/org-timer.el (org-timer-seconds):
* lisp/org/org.el (org-read-date-analyze, org-get-cursor-date):
* lisp/org/ox-html.el (org-html-format-spec):
* lisp/org/ox-icalendar.el (org-icalendar--vtodo):
Omit unnecessary call to current-time.
* lisp/calendar/time-date.el (time-to-seconds) [!float-time]:
* lisp/calendar/timeclock.el (timeclock-time-to-date):
* lisp/vc/vc-annotate.el (vc-annotate-convert-time):
Use current time if arg is nil, to be compatible with float-time.
(time-date--day-in-year): New function, with most of the guts of
the old time-to-day-in-year.
(time-to-day-in-year): Use it.
(time-to-days): Use it, to avoid decoding the same time stamp twice.
* lisp/calendar/timeclock.el (timeclock-update-mode-line):
* lisp/cedet/srecode/args.el (srecode-semantic-handle-:time):
* lisp/gnus/gnus-util.el (gnus-seconds-year):
* lisp/org/org.el (org-get-cursor-date):
Don't call current-time twice to get the current time stamp,
as this can lead to inconsistent results.
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/erc/erc.el (erc-emacs-time-to-erc-time):
* lisp/ido.el (ido-time-stamp):
* lisp/vc/vc-annotate.el (vc-annotate-convert-time):
Simplify by using float-time.
* lisp/completion.el (save-completions-to-file):
* lisp/url/url-cache.el (url-cache-prune-cache):
Rename local var to avoid confusion.
* lisp/gnus/gnus-util.el (gnus-float-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Simplify to an alias because time-to-seconds now behaves like float-time
with respect to nil arg.
* lisp/subr.el (progress-reporter-do-update):
Don't call float-time unless needed.
* lisp/erc/erc.el (erc-current-time): Simplify by using erc-emacs-time-to-erc-time.
* lisp/org/org-clock.el (org-clock-get-table-data): Omit unnecessary, lossy
conversion from floating point to Emacs time and back.
(org-resolve-clocks): Prefer two-argument floor.
2014-10-29 01:42:51 +00:00
|
|
|
|
(apply #'encode-time 0 0 0 (nthcdr 3 (decode-time)))))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
|
|
|
|
|
(defun vc-rcs-annotate-time ()
|
|
|
|
|
"Return the time of the next annotation (as fraction of days)
|
|
|
|
|
systime, or nil if there is none. Also, reposition point."
|
|
|
|
|
(unless (eobp)
|
2007-03-24 11:33:42 +00:00
|
|
|
|
(prog1 (vc-annotate-convert-time
|
|
|
|
|
(aref (get-text-property (point) :vc-rcs-r/d/a) 1))
|
|
|
|
|
(goto-char (next-single-property-change (point) :vc-annotate-prefix)))))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
|
|
|
|
|
(defun vc-rcs-annotate-extract-revision-at-line ()
|
|
|
|
|
(aref (get-text-property (point) :vc-rcs-r/d/a) 0))
|
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
|
|
|
|
;;;
|
2008-05-15 17:38:50 +00:00
|
|
|
|
;;; Tag system
|
2000-11-16 18:14:41 +00:00
|
|
|
|
;;;
|
|
|
|
|
|
Silence some vc compilation warnings
* lisp/vc/vc-arch.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-bzr.el: No need to require vc when compiling.
(vc-exec-after, vc-set-async-update, vc-default-dir-printer)
(vc-resynch-buffer, vc-dir-refresh): Declare.
(vc-setup-buffer, vc-switches): Autoload.
* lisp/vc/vc-dir.el (desktop-missing-file-warning): Declare.
* lisp/vc/vc-mtn.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-rcs.el (vc-expand-dirs, vc-switches)
(vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload.
(vc-file-tree-walk): Declare.
* lisp/vc/vc-svn.el (vc-exec-after): Declare.
(vc-switches, vc-setup-buffer): Autoload.
* lisp/obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert):
Autoload.
(vc-resynch-buffer): Declare.
2013-05-28 07:01:59 +00:00
|
|
|
|
(autoload 'vc-tag-precondition "vc")
|
|
|
|
|
(declare-function vc-file-tree-walk "vc" (dirname func &rest args))
|
|
|
|
|
|
2012-01-24 08:22:50 +00:00
|
|
|
|
(defun vc-rcs-create-tag (dir name branchp)
|
2008-05-15 17:38:50 +00:00
|
|
|
|
(when branchp
|
2012-01-24 08:22:50 +00:00
|
|
|
|
(error "RCS backend does not support module branches"))
|
2008-05-15 17:38:50 +00:00
|
|
|
|
(let ((result (vc-tag-precondition dir)))
|
|
|
|
|
(if (stringp result)
|
|
|
|
|
(error "File %s is not up-to-date" result)
|
|
|
|
|
(vc-file-tree-walk
|
|
|
|
|
dir
|
|
|
|
|
(lambda (f)
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-do-command "*vc*" 0 "rcs" (vc-master-name f) (concat "-n" name ":")))))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Miscellaneous
|
|
|
|
|
;;;
|
|
|
|
|
|
2009-08-26 17:54:05 +00:00
|
|
|
|
(defun vc-rcs-trunk-p (rev)
|
|
|
|
|
"Return t if REV is a revision on the trunk."
|
|
|
|
|
(not (eq nil (string-match "\\`[0-9]+\\.[0-9]+\\'" rev))))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-minor-part (rev)
|
|
|
|
|
"Return the minor revision number of a revision number REV."
|
|
|
|
|
(string-match "[0-9]+\\'" rev)
|
|
|
|
|
(substring rev (match-beginning 0) (match-end 0)))
|
|
|
|
|
|
* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
(vc-do-command, vc-set-async-update):
* lisp/vc/vc-mtn.el (vc-mtn-dir-status):
* lisp/vc/vc-hg.el (vc-hg-dir-status, vc-hg-dir-status-files)
(vc-hg-pull, vc-hg-merge-branch):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage, vc-git-pull)
(vc-git-merge-branch):
* lisp/vc/vc-cvs.el (vc-cvs-print-log, vc-cvs-dir-status)
(vc-cvs-dir-status-files):
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch, vc-bzr-dir-status)
(vc-bzr-dir-status-files):
* lisp/vc/vc-arch.el (vc-arch-dir-status): Use vc-run-delayed.
* lisp/vc/vc-annotate.el: Use lexical-binding.
(vc-annotate-display-select, vc-annotate): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
(vc-annotate): Don't use `goto-line'.
* lisp/vc/vc.el (vc-diff-internal): Prefer a closure to `(lambda...).
(vc-diff-internal, vc-log-internal-common): Use vc-run-delayed.
(vc-sentinel-movepoint): Declare.
* lisp/vc/vc-svn.el: Use lexical-binding.
(vc-svn-dir-status, vc-svn-dir-status-files): Use vc-run-delayed.
* lisp/vc/vc-sccs.el:
* lisp/vc/vc-rcs.el: Use lexical-binding.
2013-09-04 21:09:42 +00:00
|
|
|
|
(defun vc-rcs-previous-revision (_file rev)
|
2009-08-26 17:54:05 +00:00
|
|
|
|
"Return the revision number immediately preceding REV for FILE,
|
|
|
|
|
or nil if there is no previous revision. This default
|
|
|
|
|
implementation works for MAJOR.MINOR-style revision numbers as
|
|
|
|
|
used by RCS and CVS."
|
|
|
|
|
(let ((branch (vc-branch-part rev))
|
|
|
|
|
(minor-num (string-to-number (vc-rcs-minor-part rev))))
|
|
|
|
|
(when branch
|
|
|
|
|
(if (> minor-num 1)
|
|
|
|
|
;; revision does probably not start a branch or release
|
|
|
|
|
(concat branch "." (number-to-string (1- minor-num)))
|
|
|
|
|
(if (vc-rcs-trunk-p rev)
|
|
|
|
|
;; we are at the beginning of the trunk --
|
|
|
|
|
;; don't know anything to return here
|
|
|
|
|
nil
|
|
|
|
|
;; we are at the beginning of a branch --
|
|
|
|
|
;; return revision of starting point
|
|
|
|
|
(vc-branch-part branch))))))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-next-revision (file rev)
|
|
|
|
|
"Return the revision number immediately following REV for FILE,
|
|
|
|
|
or nil if there is no next revision. This default implementation
|
|
|
|
|
works for MAJOR.MINOR-style revision numbers as used by RCS
|
|
|
|
|
and CVS."
|
|
|
|
|
(when (not (string= rev (vc-working-revision file)))
|
|
|
|
|
(let ((branch (vc-branch-part rev))
|
|
|
|
|
(minor-num (string-to-number (vc-rcs-minor-part rev))))
|
|
|
|
|
(concat branch "." (number-to-string (1+ minor-num))))))
|
|
|
|
|
|
2014-05-20 15:46:21 +00:00
|
|
|
|
;; You might think that this should be distributed with RCS, but
|
|
|
|
|
;; apparently not. CVS sometimes provides a version of it.
|
|
|
|
|
;; http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00288.html
|
2012-06-06 01:28:08 +00:00
|
|
|
|
(defvar vc-rcs-rcs2log-program
|
|
|
|
|
(let (exe)
|
|
|
|
|
(cond ((file-executable-p
|
|
|
|
|
(setq exe (expand-file-name "rcs2log" exec-directory)))
|
|
|
|
|
exe)
|
|
|
|
|
;; In the unlikely event that someone is running an
|
|
|
|
|
;; uninstalled Emacs and wants to do something RCS-related.
|
|
|
|
|
((file-executable-p
|
|
|
|
|
(setq exe (expand-file-name "lib-src/rcs2log" source-directory)))
|
|
|
|
|
exe)
|
|
|
|
|
(t "rcs2log")))
|
|
|
|
|
"Path to the `rcs2log' program (normally in `exec-directory').")
|
|
|
|
|
|
Silence some vc compilation warnings
* lisp/vc/vc-arch.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-bzr.el: No need to require vc when compiling.
(vc-exec-after, vc-set-async-update, vc-default-dir-printer)
(vc-resynch-buffer, vc-dir-refresh): Declare.
(vc-setup-buffer, vc-switches): Autoload.
* lisp/vc/vc-dir.el (desktop-missing-file-warning): Declare.
* lisp/vc/vc-mtn.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-rcs.el (vc-expand-dirs, vc-switches)
(vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload.
(vc-file-tree-walk): Declare.
* lisp/vc/vc-svn.el (vc-exec-after): Declare.
(vc-switches, vc-setup-buffer): Autoload.
* lisp/obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert):
Autoload.
(vc-resynch-buffer): Declare.
2013-05-28 07:01:59 +00:00
|
|
|
|
(autoload 'vc-buffer-sync "vc-dispatcher")
|
|
|
|
|
|
2009-08-26 17:54:05 +00:00
|
|
|
|
(defun vc-rcs-update-changelog (files)
|
|
|
|
|
"Default implementation of update-changelog.
|
|
|
|
|
Uses `rcs2log' which only works for RCS and CVS."
|
|
|
|
|
;; FIXME: We (c|sh)ould add support for cvs2cl
|
|
|
|
|
(let ((odefault default-directory)
|
|
|
|
|
(changelog (find-change-log))
|
|
|
|
|
;; Presumably not portable to non-Unixy systems, along with rcs2log:
|
|
|
|
|
(tempfile (make-temp-file
|
|
|
|
|
(expand-file-name "vc"
|
|
|
|
|
(or small-temporary-file-directory
|
|
|
|
|
temporary-file-directory))))
|
|
|
|
|
(login-name (or user-login-name
|
|
|
|
|
(format "uid%d" (number-to-string (user-uid)))))
|
|
|
|
|
(full-name (or add-log-full-name
|
|
|
|
|
(user-full-name)
|
|
|
|
|
(user-login-name)
|
|
|
|
|
(format "uid%d" (number-to-string (user-uid)))))
|
|
|
|
|
(mailing-address (or add-log-mailing-address
|
|
|
|
|
user-mail-address)))
|
|
|
|
|
(find-file-other-window changelog)
|
|
|
|
|
(barf-if-buffer-read-only)
|
|
|
|
|
(vc-buffer-sync)
|
|
|
|
|
(undo-boundary)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(push-mark)
|
|
|
|
|
(message "Computing change log entries...")
|
|
|
|
|
(message "Computing change log entries... %s"
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
|
|
|
|
(setq default-directory odefault)
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(if (eq 0 (apply #'call-process vc-rcs-rcs2log-program
|
2009-08-26 17:54:05 +00:00
|
|
|
|
nil (list t tempfile) nil
|
|
|
|
|
"-c" changelog
|
|
|
|
|
"-u" (concat login-name
|
|
|
|
|
"\t" full-name
|
|
|
|
|
"\t" mailing-address)
|
|
|
|
|
(mapcar
|
|
|
|
|
(lambda (f)
|
|
|
|
|
(file-relative-name
|
|
|
|
|
(expand-file-name f odefault)))
|
|
|
|
|
files)))
|
|
|
|
|
"done"
|
|
|
|
|
(pop-to-buffer (get-buffer-create "*vc*"))
|
|
|
|
|
(erase-buffer)
|
|
|
|
|
(insert-file-contents tempfile)
|
|
|
|
|
"failed"))
|
|
|
|
|
(setq default-directory (file-name-directory changelog))
|
|
|
|
|
(delete-file tempfile)))))
|
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(defun vc-rcs-check-headers ()
|
|
|
|
|
"Check if the current file has any headers in it."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(re-search-forward "\\$[A-Za-z\300-\326\330-\366\370-\377]+\
|
|
|
|
|
\\(: [\t -#%-\176\240-\377]*\\)?\\$" nil t)))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-clear-headers ()
|
2014-12-02 04:49:35 +00:00
|
|
|
|
"Clear RCS header value parts."
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(let ((case-fold-search nil))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward
|
|
|
|
|
(concat "\\$\\(Author\\|Date\\|Header\\|Id\\|Locker\\|Name\\|"
|
|
|
|
|
"RCSfile\\|Revision\\|Source\\|State\\): [^$\n]+\\$")
|
|
|
|
|
nil t)
|
|
|
|
|
(replace-match "$\\1$"))))
|
|
|
|
|
|
2014-11-26 18:10:26 +00:00
|
|
|
|
(autoload 'vc-rename-master "vc-filewise")
|
Silence some vc compilation warnings
* lisp/vc/vc-arch.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-bzr.el: No need to require vc when compiling.
(vc-exec-after, vc-set-async-update, vc-default-dir-printer)
(vc-resynch-buffer, vc-dir-refresh): Declare.
(vc-setup-buffer, vc-switches): Autoload.
* lisp/vc/vc-dir.el (desktop-missing-file-warning): Declare.
* lisp/vc/vc-mtn.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* lisp/vc/vc-rcs.el (vc-expand-dirs, vc-switches)
(vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload.
(vc-file-tree-walk): Declare.
* lisp/vc/vc-svn.el (vc-exec-after): Declare.
(vc-switches, vc-setup-buffer): Autoload.
* lisp/obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert):
Autoload.
(vc-resynch-buffer): Declare.
2013-05-28 07:01:59 +00:00
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(defun vc-rcs-rename-file (old new)
|
|
|
|
|
;; Just move the master file (using vc-rcs-master-templates).
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-rename-master (vc-master-name old) new vc-rcs-master-templates))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
* vc-hooks.el (vc-stay-local-p, vc-state, vc-working-revision):
Add an optional argument for the backend, use it instead of
calling vc-backend.
(vc-mode-line): Add an optional argument for the backend. Pass
the backend to vc-state and vc-working-revision. Move code for
special handling for vc-state being a buffer to ...
* vc-rcs.el (vc-rcs-find-file-hook):
* vc-sccs.el (vc-sccs-find-file-hook): ... here. New functions.
* vc-svn.el (vc-svn-state, vc-svn-dir-status, vc-svn-checkout)
(vc-svn-print-log, vc-svn-diff): Pass 'SVN to vc-state,
vc-stay-local-p and vc-mode-line calls.
* vc-cvs.el (vc-cvs-state, vc-cvs-checkout, vc-cvs-print-log)
(vc-cvs-diff, vc-cvs-annotate-command)
(vc-cvs-make-version-backups-p, vc-cvs-stay-local-p)
(vc-cvs-dir-status): Pass 'CVS to vc-state, vc-stay-local-p and
vc-mode-line calls.
* vc.el (vc-deduce-fileset): Use vc-deduce-fileset instead of
direct comparison.
(vc-next-action, vc-transfer-file, vc-rename-file): Also pass the
backend when calling vc-mode-line.
(vc-register): Do not create a closure for calling the vc register
function, call it directly.
2009-06-23 06:35:40 +00:00
|
|
|
|
(defun vc-rcs-find-file-hook ()
|
|
|
|
|
;; If the file is locked by some other user, make
|
|
|
|
|
;; the buffer read-only. Like this, even root
|
|
|
|
|
;; cannot modify a file that someone else has locked.
|
2009-07-16 20:52:53 +00:00
|
|
|
|
(and (stringp (vc-state buffer-file-name 'RCS))
|
|
|
|
|
(setq buffer-read-only t)))
|
* vc-hooks.el (vc-stay-local-p, vc-state, vc-working-revision):
Add an optional argument for the backend, use it instead of
calling vc-backend.
(vc-mode-line): Add an optional argument for the backend. Pass
the backend to vc-state and vc-working-revision. Move code for
special handling for vc-state being a buffer to ...
* vc-rcs.el (vc-rcs-find-file-hook):
* vc-sccs.el (vc-sccs-find-file-hook): ... here. New functions.
* vc-svn.el (vc-svn-state, vc-svn-dir-status, vc-svn-checkout)
(vc-svn-print-log, vc-svn-diff): Pass 'SVN to vc-state,
vc-stay-local-p and vc-mode-line calls.
* vc-cvs.el (vc-cvs-state, vc-cvs-checkout, vc-cvs-print-log)
(vc-cvs-diff, vc-cvs-annotate-command)
(vc-cvs-make-version-backups-p, vc-cvs-stay-local-p)
(vc-cvs-dir-status): Pass 'CVS to vc-state, vc-stay-local-p and
vc-mode-line calls.
* vc.el (vc-deduce-fileset): Use vc-deduce-fileset instead of
direct comparison.
(vc-next-action, vc-transfer-file, vc-rename-file): Also pass the
backend when calling vc-mode-line.
(vc-register): Do not create a closure for calling the vc register
function, call it directly.
2009-06-23 06:35:40 +00:00
|
|
|
|
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Internal functions
|
|
|
|
|
;;;
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-workfile-is-newer (file)
|
|
|
|
|
"Return non-nil if FILE is newer than its RCS master.
|
|
|
|
|
This likely means that FILE has been changed with respect
|
|
|
|
|
to its master version."
|
|
|
|
|
(let ((file-time (nth 5 (file-attributes file)))
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(master-time (nth 5 (file-attributes (vc-master-name file)))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(or (> (nth 0 file-time) (nth 0 master-time))
|
|
|
|
|
(and (= (nth 0 file-time) (nth 0 master-time))
|
|
|
|
|
(> (nth 1 file-time) (nth 1 master-time))))))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-find-most-recent-rev (branch)
|
|
|
|
|
"Find most recent revision on BRANCH."
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(let ((latest-rev -1) value)
|
|
|
|
|
(while (re-search-forward (concat "^\\(" (regexp-quote branch)
|
|
|
|
|
"\\.\\([0-9]+\\)\\)\ndate[ \t]+[0-9.]+;")
|
|
|
|
|
nil t)
|
|
|
|
|
(let ((rev (string-to-number (match-string 2))))
|
|
|
|
|
(when (< latest-rev rev)
|
|
|
|
|
(setq latest-rev rev)
|
|
|
|
|
(setq value (match-string 1)))))
|
|
|
|
|
(or value
|
2002-01-05 17:21:06 +00:00
|
|
|
|
(vc-branch-part branch))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(defun vc-rcs-fetch-master-state (file &optional working-revision)
|
2000-11-16 18:14:41 +00:00
|
|
|
|
"Compute the master file's idea of the state of FILE.
|
2008-09-15 23:28:39 +00:00
|
|
|
|
If a WORKING-REVISION is given, compute the state of that version,
|
2000-11-16 18:14:41 +00:00
|
|
|
|
otherwise determine the workfile version based on the master file.
|
2007-10-10 18:52:45 +00:00
|
|
|
|
This function sets the properties `vc-working-revision' and
|
2000-11-16 18:14:41 +00:00
|
|
|
|
`vc-checkout-model' to their correct values, based on the master
|
|
|
|
|
file."
|
2015-03-01 16:51:31 +00:00
|
|
|
|
(when (and (file-regular-p file) (vc-master-name file))
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(if (or (not (vc-insert-file (vc-master-name file) "^[0-9]"))
|
|
|
|
|
(progn (goto-char (point-min))
|
|
|
|
|
(not (looking-at "^head[ \t\n]+[^;]+;$"))))
|
|
|
|
|
(error "File %s is not an RCS master file" (vc-master-name file)))
|
|
|
|
|
(let ((workfile-is-latest nil)
|
|
|
|
|
(default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1)))
|
|
|
|
|
(vc-file-setprop file 'vc-rcs-default-branch default-branch)
|
|
|
|
|
(unless working-revision
|
|
|
|
|
;; Workfile version not known yet. Determine that first. It
|
|
|
|
|
;; is either the head of the trunk, the head of the default
|
|
|
|
|
;; branch, or the "default branch" itself, if that is a full
|
|
|
|
|
;; revision number.
|
|
|
|
|
(cond
|
|
|
|
|
;; no default branch
|
|
|
|
|
((or (not default-branch) (string= "" default-branch))
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(setq working-revision
|
2015-03-01 16:51:31 +00:00
|
|
|
|
(vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1))
|
|
|
|
|
(setq workfile-is-latest t))
|
|
|
|
|
;; default branch is actually a revision
|
|
|
|
|
((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$"
|
|
|
|
|
default-branch)
|
|
|
|
|
(setq working-revision default-branch))
|
|
|
|
|
;; else, search for the head of the default branch
|
|
|
|
|
(t (vc-insert-file (vc-master-name file) "^desc")
|
|
|
|
|
(setq working-revision
|
|
|
|
|
(vc-rcs-find-most-recent-rev default-branch))
|
|
|
|
|
(setq workfile-is-latest t)))
|
|
|
|
|
(vc-file-setprop file 'vc-working-revision working-revision))
|
|
|
|
|
;; Check strict locking
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(vc-file-setprop file 'vc-checkout-model
|
|
|
|
|
(if (re-search-forward ";[ \t\n]*strict;" nil t)
|
|
|
|
|
'locking 'implicit))
|
|
|
|
|
;; Compute state of workfile version
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(let ((locking-user
|
|
|
|
|
(vc-parse-buffer (concat "^locks[ \t\n]+[^;]*[ \t\n]+\\([^:]+\\):"
|
|
|
|
|
(regexp-quote working-revision)
|
|
|
|
|
"[^0-9.]")
|
|
|
|
|
1)))
|
|
|
|
|
(cond
|
|
|
|
|
;; not locked
|
|
|
|
|
((not locking-user)
|
|
|
|
|
(if (or workfile-is-latest
|
|
|
|
|
(vc-rcs-latest-on-branch-p file working-revision))
|
|
|
|
|
;; workfile version is latest on branch
|
|
|
|
|
'up-to-date
|
|
|
|
|
;; workfile version is not latest on branch
|
|
|
|
|
'needs-update))
|
|
|
|
|
;; locked by the calling user
|
|
|
|
|
((and (stringp locking-user)
|
|
|
|
|
(string= locking-user (vc-user-login-name file)))
|
|
|
|
|
;; Don't call `vc-rcs-checkout-model' to avoid inf-looping.
|
|
|
|
|
(if (or (eq (vc-file-getprop file 'vc-checkout-model) 'locking)
|
|
|
|
|
workfile-is-latest
|
|
|
|
|
(vc-rcs-latest-on-branch-p file working-revision))
|
|
|
|
|
'edited
|
|
|
|
|
;; Locking is not used for the file, but the owner does
|
|
|
|
|
;; have a lock, and there is a higher version on the current
|
|
|
|
|
;; branch. Not sure if this can occur, and if it is right
|
|
|
|
|
;; to use `needs-merge' in this case.
|
|
|
|
|
'needs-merge))
|
|
|
|
|
;; locked by somebody else
|
|
|
|
|
((stringp locking-user)
|
|
|
|
|
locking-user)
|
|
|
|
|
(t
|
|
|
|
|
(error "Error getting state of RCS file"))))))))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
|
|
|
|
|
(defun vc-rcs-consult-headers (file)
|
|
|
|
|
"Search for RCS headers in FILE, and set properties accordingly.
|
|
|
|
|
|
|
|
|
|
Returns: nil if no headers were found
|
|
|
|
|
'rev if a workfile revision was found
|
|
|
|
|
'rev-and-lock if revision and lock info was found"
|
|
|
|
|
(cond
|
|
|
|
|
((not (get-file-buffer file)) nil)
|
2014-12-01 14:08:26 +00:00
|
|
|
|
((let (status version)
|
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
|
|
|
|
(with-current-buffer (get-file-buffer file)
|
2009-11-16 14:41:05 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
|
|
|
|
(cond
|
2009-11-16 14:41:05 +00:00
|
|
|
|
;; search for $Id or $Header
|
|
|
|
|
;; -------------------------
|
|
|
|
|
;; The `\ 's below avoid an RCS 5.7 bug when checking in this file.
|
|
|
|
|
((or (and (search-forward "$Id\ : " nil t)
|
|
|
|
|
(looking-at "[^ ]+ \\([0-9.]+\\) "))
|
|
|
|
|
(and (progn (goto-char (point-min))
|
|
|
|
|
(search-forward "$Header\ : " nil t))
|
|
|
|
|
(looking-at "[^ ]+ \\([0-9.]+\\) ")))
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
;; if found, store the revision number ...
|
|
|
|
|
(setq version (match-string-no-properties 1))
|
|
|
|
|
;; ... and check for the locking state
|
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
|
|
|
|
(cond
|
2009-11-16 14:41:05 +00:00
|
|
|
|
((looking-at
|
|
|
|
|
(concat "[0-9]+[/-][01][0-9][/-][0-3][0-9] " ; date
|
|
|
|
|
"[0-2][0-9]:[0-5][0-9]+:[0-6][0-9]+\\([+-][0-9:]+\\)? " ; time
|
|
|
|
|
"[^ ]+ [^ ]+ ")) ; author & state
|
|
|
|
|
(goto-char (match-end 0)) ; [0-6] in regexp handles leap seconds
|
|
|
|
|
(cond
|
|
|
|
|
;; unlocked revision
|
|
|
|
|
((looking-at "\\$")
|
2014-12-01 14:08:26 +00:00
|
|
|
|
;;(setq locking-user 'none)
|
2009-11-16 14:41:05 +00:00
|
|
|
|
(setq status 'rev-and-lock))
|
|
|
|
|
;; revision is locked by some user
|
|
|
|
|
((looking-at "\\([^ ]+\\) \\$")
|
2014-12-01 14:08:26 +00:00
|
|
|
|
;;(setq locking-user (match-string-no-properties 1))
|
2009-11-16 14:41:05 +00:00
|
|
|
|
(setq status 'rev-and-lock))
|
|
|
|
|
;; everything else: false
|
|
|
|
|
(nil)))
|
|
|
|
|
;; unexpected information in
|
|
|
|
|
;; keyword string --> quit
|
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
|
|
|
|
(nil)))
|
2009-11-16 14:41:05 +00:00
|
|
|
|
;; search for $Revision
|
|
|
|
|
;; --------------------
|
|
|
|
|
((re-search-forward (concat "\\$"
|
|
|
|
|
"Revision: \\([0-9.]+\\) \\$")
|
|
|
|
|
nil t)
|
|
|
|
|
;; if found, store the revision number ...
|
|
|
|
|
(setq version (match-string-no-properties 1))
|
|
|
|
|
;; and see if there's any lock information
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (re-search-forward (concat "\\$" "Locker:") nil t)
|
|
|
|
|
(cond ((looking-at " \\([^ ]+\\) \\$")
|
2014-12-01 14:08:26 +00:00
|
|
|
|
;;(setq locking-user (match-string-no-properties 1))
|
2009-11-16 14:41:05 +00:00
|
|
|
|
(setq status 'rev-and-lock))
|
|
|
|
|
((looking-at " *\\$")
|
2014-12-01 14:08:26 +00:00
|
|
|
|
;;(setq locking-user 'none)
|
2009-11-16 14:41:05 +00:00
|
|
|
|
(setq status 'rev-and-lock))
|
|
|
|
|
(t
|
2014-12-01 14:08:26 +00:00
|
|
|
|
;;(setq locking-user 'none)
|
2009-11-16 14:41:05 +00:00
|
|
|
|
(setq status 'rev-and-lock)))
|
|
|
|
|
(setq status 'rev)))
|
|
|
|
|
;; else: nothing found
|
|
|
|
|
;; -------------------
|
|
|
|
|
(t nil))))
|
2007-10-10 18:52:45 +00:00
|
|
|
|
(if status (vc-file-setprop file 'vc-working-revision version))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
status))))
|
|
|
|
|
|
|
|
|
|
(defun vc-release-greater-or-equal (r1 r2)
|
|
|
|
|
"Compare release numbers, represented as strings.
|
|
|
|
|
Release components are assumed cardinal numbers, not decimal fractions
|
|
|
|
|
\(5.10 is a higher release than 5.9\). Omitted fields are considered
|
|
|
|
|
lower \(5.6.7 is earlier than 5.6.7.1\). Comparison runs till the end
|
|
|
|
|
of the string is found, or a non-numeric component shows up \(5.6.7 is
|
|
|
|
|
earlier than \"5.6.7 beta\", which is probably not what you want in
|
|
|
|
|
some cases\). This code is suitable for existing RCS release numbers.
|
|
|
|
|
CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5\)."
|
|
|
|
|
(let (v1 v2 i1 i2)
|
|
|
|
|
(catch 'done
|
|
|
|
|
(or (and (string-match "^\\.?\\([0-9]+\\)" r1)
|
|
|
|
|
(setq i1 (match-end 0))
|
|
|
|
|
(setq v1 (string-to-number (match-string 1 r1)))
|
|
|
|
|
(or (and (string-match "^\\.?\\([0-9]+\\)" r2)
|
|
|
|
|
(setq i2 (match-end 0))
|
|
|
|
|
(setq v2 (string-to-number (match-string 1 r2)))
|
|
|
|
|
(if (> v1 v2) (throw 'done t)
|
|
|
|
|
(if (< v1 v2) (throw 'done nil)
|
|
|
|
|
(throw 'done
|
|
|
|
|
(vc-release-greater-or-equal
|
|
|
|
|
(substring r1 i1)
|
|
|
|
|
(substring r2 i2)))))))
|
|
|
|
|
(throw 'done t)))
|
|
|
|
|
(or (and (string-match "^\\.?\\([0-9]+\\)" r2)
|
|
|
|
|
(throw 'done nil))
|
|
|
|
|
(throw 'done t)))))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-release-p (release)
|
|
|
|
|
"Return t if we have RELEASE or better."
|
|
|
|
|
(let ((installation (vc-rcs-system-release)))
|
|
|
|
|
(if (and installation
|
|
|
|
|
(not (eq installation 'unknown)))
|
|
|
|
|
(vc-release-greater-or-equal installation release))))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-system-release ()
|
|
|
|
|
"Return the RCS release installed on this system, as a string.
|
2008-09-15 23:28:39 +00:00
|
|
|
|
Return symbol `unknown' if the release cannot be deducted. The user can
|
2000-11-16 18:14:41 +00:00
|
|
|
|
override this using variable `vc-rcs-release'.
|
|
|
|
|
|
|
|
|
|
If the user has not set variable `vc-rcs-release' and it is nil,
|
|
|
|
|
variable `vc-rcs-release' is set to the returned value."
|
|
|
|
|
(or vc-rcs-release
|
|
|
|
|
(setq vc-rcs-release
|
2008-05-10 13:27:16 +00:00
|
|
|
|
(or (and (zerop (vc-do-command "*vc*" nil "rcs" nil "-V"))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(with-current-buffer (get-buffer "*vc*")
|
|
|
|
|
(vc-parse-buffer "^RCS version \\([0-9.]+ *.*\\)" 1)))
|
|
|
|
|
'unknown))))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-set-non-strict-locking (file)
|
2008-05-10 13:27:16 +00:00
|
|
|
|
(vc-do-command "*vc*" 0 "rcs" file "-U")
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(vc-file-setprop file 'vc-checkout-model 'implicit)
|
|
|
|
|
(set-file-modes file (logior (file-modes file) 128)))
|
|
|
|
|
|
|
|
|
|
(defun vc-rcs-set-default-branch (file branch)
|
2014-11-22 05:10:31 +00:00
|
|
|
|
(vc-do-command "*vc*" 0 "rcs" (vc-master-name file) (concat "-b" branch))
|
2000-11-16 18:14:41 +00:00
|
|
|
|
(vc-file-setprop file 'vc-rcs-default-branch branch))
|
|
|
|
|
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(defun vc-rcs-parse (&optional buffer)
|
|
|
|
|
"Parse current buffer, presumed to be in RCS-style masterfile format.
|
|
|
|
|
Optional arg BUFFER specifies another buffer to parse. Return an alist
|
|
|
|
|
of two elements, w/ keys `headers' and `revisions' and values in turn
|
|
|
|
|
sub-alists. For `headers', the values unless otherwise specified are
|
|
|
|
|
strings and the keys are:
|
|
|
|
|
|
|
|
|
|
desc -- description
|
|
|
|
|
head -- latest revision
|
|
|
|
|
branch -- the branch the \"head revision\" lies on;
|
|
|
|
|
absent if the head revision lies on the trunk
|
|
|
|
|
access -- ???
|
|
|
|
|
symbols -- sub-alist of (SYMBOL . REVISION) elements
|
|
|
|
|
locks -- if file is checked out, something like \"ttn:1.7\"
|
|
|
|
|
strict -- t if \"strict locking\" is in effect, otherwise nil
|
|
|
|
|
comment -- may be absent; typically something like \"# \" or \"; \"
|
|
|
|
|
expand -- may be absent; ???
|
|
|
|
|
|
|
|
|
|
For `revisions', the car is REVISION (string), the cdr a sub-alist,
|
|
|
|
|
with string values (unless otherwise specified) and keys:
|
|
|
|
|
|
|
|
|
|
date -- a time value (like that returned by `encode-time'); as a
|
|
|
|
|
special case, a year value less than 100 is augmented by 1900
|
|
|
|
|
author -- username
|
|
|
|
|
state -- typically \"Exp\" or \"Rel\"
|
|
|
|
|
branches -- list of revisions that begin branches from this revision
|
|
|
|
|
next -- on the trunk: the chronologically-preceding revision, or \"\";
|
|
|
|
|
on a branch: the chronologically-following revision, or \"\"
|
|
|
|
|
log -- change log entry
|
|
|
|
|
text -- for the head revision on the trunk, the body of the file;
|
|
|
|
|
other revisions have `:insn' instead
|
|
|
|
|
:insn -- for non-head revisions, a list of parsed instructions
|
|
|
|
|
in one of two forms, in both cases START meaning \"first
|
|
|
|
|
go to line START\":
|
|
|
|
|
- `(START k COUNT)' -- kill COUNT lines
|
|
|
|
|
- `(START i TEXT)' -- insert TEXT (a string)
|
|
|
|
|
The list is in descending order by START.
|
|
|
|
|
|
|
|
|
|
The `:insn' key is a keyword to distinguish it as a vc-rcs.el extension."
|
|
|
|
|
(setq buffer (get-buffer (or buffer (current-buffer))))
|
|
|
|
|
(set-buffer buffer)
|
|
|
|
|
;; An RCS masterfile can be viewed as containing four regular (for the
|
|
|
|
|
;; most part) sections: (a) the "headers", (b) the "rev headers", (c)
|
|
|
|
|
;; the "description" and (d) the "rev bodies", in that order. In the
|
|
|
|
|
;; returned alist (see docstring), elements from (b) and (d) are
|
|
|
|
|
;; combined pairwise to form the "revisions", while those from (a) and
|
|
|
|
|
;; (c) are simply combined to form the "headers".
|
|
|
|
|
;;
|
|
|
|
|
;; Loosely speaking, each section contains a series of alternating
|
|
|
|
|
;; "tags" and "printed representations". In the (b) and (d), many
|
|
|
|
|
;; such series can appear, and a revision number on a line by itself
|
|
|
|
|
;; precedes the series of tags and printed representations associated
|
|
|
|
|
;; with it.
|
|
|
|
|
;;
|
|
|
|
|
;; In (a) and (b), the printed representations (with the exception of
|
|
|
|
|
;; the `comment' tag in the headers) terminate with a semicolon, which
|
|
|
|
|
;; is NOT part of the "value" finally associated with the tag. All
|
|
|
|
|
;; other printed representations are in "@@-format"; there is an "@",
|
|
|
|
|
;; the middle part (to be translated into the value), another "@" and
|
|
|
|
|
;; a newline. Each "@@" in the middle part indicates the position of
|
|
|
|
|
;; a single "@" (and consequently the requirement of an additional
|
|
|
|
|
;; initial step when translating to the value).
|
|
|
|
|
;;
|
|
|
|
|
;; Parser state includes vars that collect parts of the return value...
|
|
|
|
|
(let ((desc nil) (headers nil) (revs nil)
|
|
|
|
|
;; ... as well as vars that support a single-pass, tag-assisted,
|
|
|
|
|
;; minimal-data-copying scan. Basically -- skirting around the
|
|
|
|
|
;; grouping by revision required in (b) and (d) -- we repeatedly
|
|
|
|
|
;; and context-sensitively read a tag (that MUST be present),
|
|
|
|
|
;; determine the bounds of the printed representation, translate
|
|
|
|
|
;; it into a value, and push the tag plus value onto one of the
|
|
|
|
|
;; collection vars. Finally, we return the parse tree
|
|
|
|
|
;; incorporating the values of the collection vars (see "rv").
|
|
|
|
|
;;
|
|
|
|
|
;; A symbol or string to keep track of context (for error messages).
|
|
|
|
|
context
|
|
|
|
|
;; A symbol, the current tag.
|
|
|
|
|
tok
|
|
|
|
|
;; Region (begin and end buffer positions) of the printed
|
|
|
|
|
;; representation for the current tag.
|
|
|
|
|
b e
|
|
|
|
|
;; A list of buffer positions where "@@" can be found within the
|
|
|
|
|
;; printed representation region. For each location, we push two
|
|
|
|
|
;; elements onto the list, 1+ and 2+ the location, respectively,
|
|
|
|
|
;; with the 2+ appearing at the head. In this way, the expression
|
|
|
|
|
;; `(,e ,@@-holes ,b)
|
|
|
|
|
;; describes regions that can be concatenated (in reverse order)
|
|
|
|
|
;; to "de-@@-format" the printed representation as the first step
|
|
|
|
|
;; to translating it into some value. See internal func `gather'.
|
|
|
|
|
@-holes)
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(cl-flet*
|
|
|
|
|
((sw () (skip-chars-forward " \t\n")) ; i.e., `[:space:]'
|
|
|
|
|
(at (tag) (save-excursion (eq tag (read buffer))))
|
|
|
|
|
(to-eol () (buffer-substring-no-properties
|
|
|
|
|
(point) (progn (forward-line 1)
|
|
|
|
|
(1- (point)))))
|
|
|
|
|
(to-semi () (setq b (point)
|
|
|
|
|
e (progn (search-forward ";")
|
|
|
|
|
(1- (point)))))
|
|
|
|
|
(to-one@ () (setq @-holes nil
|
|
|
|
|
b (progn (search-forward "@") (point))
|
|
|
|
|
e (progn (while (and (search-forward "@")
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(= ?@ (char-after)))
|
|
|
|
|
(push (point) @-holes)
|
|
|
|
|
(forward-char 1)
|
|
|
|
|
(push (point) @-holes))
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(1- (point)))))
|
|
|
|
|
(tok+val (set-b+e name &optional proc)
|
|
|
|
|
(unless (eq name (setq tok (read buffer)))
|
|
|
|
|
(error "Missing `%s' while parsing %s" name context))
|
|
|
|
|
(sw)
|
|
|
|
|
(funcall set-b+e)
|
|
|
|
|
(cons tok (if proc
|
|
|
|
|
(funcall proc)
|
|
|
|
|
(buffer-substring-no-properties b e))))
|
|
|
|
|
(k-semi (name &optional proc) (tok+val #'to-semi name proc))
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(gather (b e @-holes)
|
|
|
|
|
(let ((pairs `(,e ,@@-holes ,b))
|
|
|
|
|
acc)
|
|
|
|
|
(while pairs
|
|
|
|
|
(push (buffer-substring-no-properties
|
|
|
|
|
(cadr pairs) (car pairs))
|
|
|
|
|
acc)
|
|
|
|
|
(setq pairs (cddr pairs)))
|
|
|
|
|
(apply #'concat acc)))
|
|
|
|
|
(gather1 () (gather b e @-holes))
|
|
|
|
|
(k-one@ (name &optional later)
|
|
|
|
|
(tok+val #'to-one@ name (if later (lambda () t) #'gather1))))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
;; headers
|
|
|
|
|
(setq context 'headers)
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(cl-flet ((hpush (name &optional proc)
|
|
|
|
|
(push (k-semi name proc) headers)))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(hpush 'head)
|
|
|
|
|
(when (at 'branch)
|
|
|
|
|
(hpush 'branch))
|
|
|
|
|
(hpush 'access)
|
|
|
|
|
(hpush 'symbols
|
|
|
|
|
(lambda ()
|
|
|
|
|
(mapcar (lambda (together)
|
|
|
|
|
(let ((two (split-string together ":")))
|
|
|
|
|
(setcar two (intern (car two)))
|
|
|
|
|
(setcdr two (cadr two))
|
|
|
|
|
two))
|
|
|
|
|
(split-string
|
|
|
|
|
(buffer-substring-no-properties b e)))))
|
|
|
|
|
(hpush 'locks))
|
|
|
|
|
(push `(strict . ,(when (at 'strict)
|
|
|
|
|
(search-forward ";")
|
|
|
|
|
t))
|
|
|
|
|
headers)
|
|
|
|
|
(when (at 'comment)
|
|
|
|
|
(push (k-one@ 'comment) headers)
|
|
|
|
|
(search-forward ";"))
|
|
|
|
|
(when (at 'expand)
|
|
|
|
|
(push (k-one@ 'expand) headers)
|
|
|
|
|
(search-forward ";"))
|
|
|
|
|
(setq headers (nreverse headers))
|
|
|
|
|
;; rev headers
|
|
|
|
|
(sw) (setq context 'rev-headers)
|
|
|
|
|
(while (looking-at "[0-9]")
|
|
|
|
|
(push `(,(to-eol)
|
|
|
|
|
,(k-semi 'date
|
|
|
|
|
(lambda ()
|
|
|
|
|
(let ((ls (mapcar 'string-to-number
|
|
|
|
|
(split-string
|
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
|
b e)
|
|
|
|
|
"\\."))))
|
|
|
|
|
;; Hack the year -- verified to be the
|
|
|
|
|
;; same algorithm used in RCS 5.7.
|
|
|
|
|
(when (< (car ls) 100)
|
|
|
|
|
(setcar ls (+ 1900 (car ls))))
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(apply #'encode-time (nreverse ls)))))
|
2012-06-27 15:11:28 +00:00
|
|
|
|
,@(mapcar #'k-semi '(author state))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
,(k-semi 'branches
|
|
|
|
|
(lambda ()
|
|
|
|
|
(split-string
|
|
|
|
|
(buffer-substring-no-properties b e))))
|
|
|
|
|
,(k-semi 'next))
|
|
|
|
|
revs)
|
|
|
|
|
(sw))
|
|
|
|
|
(setq revs (nreverse revs))
|
|
|
|
|
;; desc
|
|
|
|
|
(sw) (setq context 'desc
|
|
|
|
|
desc (k-one@ 'desc))
|
|
|
|
|
;; rev bodies
|
|
|
|
|
(let (acc
|
|
|
|
|
;; Element of `revs' that initially holds only header info.
|
|
|
|
|
;; "Pairwise combination" occurs when we add body info.
|
|
|
|
|
rev
|
|
|
|
|
;; Components of the editing commands (aside from the actual
|
|
|
|
|
;; text) that comprise the `text' printed representations
|
|
|
|
|
;; (not including the "head" revision).
|
|
|
|
|
cmd start act
|
|
|
|
|
;; Ascending (reversed) `@-holes' which the internal func
|
|
|
|
|
;; `incg' pops to effect incremental gathering.
|
|
|
|
|
asc
|
|
|
|
|
;; Function to extract text (for the `a' command), either
|
|
|
|
|
;; `incg' or `buffer-substring-no-properties'. (This is
|
|
|
|
|
;; for speed; strictly speaking, it is sufficient to use
|
|
|
|
|
;; only the former since it behaves identically to the
|
2011-11-14 23:59:56 +00:00
|
|
|
|
;; latter in the absence of "@@".)
|
2004-11-19 15:08:32 +00:00
|
|
|
|
sub)
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(cl-flet ((incg (beg end)
|
|
|
|
|
(let ((b beg) (e end) @-holes)
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(while (and asc (< (car asc) e))
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(push (pop asc) @-holes)
|
2012-06-27 15:11:28 +00:00
|
|
|
|
(push (pop asc) @-holes))
|
|
|
|
|
;; Self-deprecate when work is done.
|
|
|
|
|
;; Folding many dimensions into one.
|
|
|
|
|
;; Thanks B.Mandelbrot, for complex sum.
|
|
|
|
|
;; O beauteous math! --the Unvexed Bum
|
|
|
|
|
(unless asc
|
|
|
|
|
(setq sub #'buffer-substring-no-properties))
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(gather b e @-holes))))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(while (and (sw)
|
|
|
|
|
(not (eobp))
|
|
|
|
|
(setq context (to-eol)
|
|
|
|
|
rev (or (assoc context revs)
|
|
|
|
|
(error "Rev `%s' has body but no head"
|
|
|
|
|
context))))
|
|
|
|
|
(push (k-one@ 'log) (cdr rev))
|
|
|
|
|
;; For rev body `text' tags, delay translation slightly...
|
|
|
|
|
(push (k-one@ 'text t) (cdr rev))
|
|
|
|
|
;; ... until we decide which tag and value is appropriate to
|
|
|
|
|
;; collect. For the "head" revision, compute the value of the
|
|
|
|
|
;; `text' printed representation by simple `gather'. For all
|
|
|
|
|
;; other revisions, replace the `text' tag+value with `:insn'
|
|
|
|
|
;; plus value, always scanning in-place.
|
|
|
|
|
(if (string= context (cdr (assq 'head headers)))
|
2013-11-05 15:27:51 +00:00
|
|
|
|
(setcdr (cadr rev) (gather b e @-holes))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(if @-holes
|
|
|
|
|
(setq asc (nreverse @-holes)
|
2012-06-27 15:11:28 +00:00
|
|
|
|
sub #'incg)
|
|
|
|
|
(setq sub #'buffer-substring-no-properties))
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(goto-char b)
|
|
|
|
|
(setq acc nil)
|
|
|
|
|
(while (< (point) e)
|
|
|
|
|
(forward-char 1)
|
|
|
|
|
(setq cmd (char-before)
|
|
|
|
|
start (read (current-buffer))
|
|
|
|
|
act (read (current-buffer)))
|
|
|
|
|
(forward-char 1)
|
More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 23:13:41 +00:00
|
|
|
|
(push (pcase cmd
|
2004-11-19 15:08:32 +00:00
|
|
|
|
(?d
|
|
|
|
|
;; `d' means "delete lines".
|
|
|
|
|
;; For Emacs spirit, we use `k' for "kill".
|
|
|
|
|
`(,start k ,act))
|
|
|
|
|
(?a
|
|
|
|
|
;; `a' means "append after this line" but
|
|
|
|
|
;; internally we normalize it so that START
|
|
|
|
|
;; specifies the actual line for insert, thus
|
|
|
|
|
;; requiring less hair in the realization algs.
|
|
|
|
|
;; For Emacs spirit, we use `i' for "insert".
|
|
|
|
|
`(,(1+ start) i
|
|
|
|
|
,(funcall sub (point) (progn (forward-line act)
|
|
|
|
|
(point)))))
|
More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
2012-07-11 23:13:41 +00:00
|
|
|
|
(_ (error "Bad command `%c' in `text' for rev `%s'"
|
2004-11-19 15:08:32 +00:00
|
|
|
|
cmd context)))
|
|
|
|
|
acc))
|
|
|
|
|
(goto-char (1+ e))
|
|
|
|
|
(setcar (cdr rev) (cons :insn acc)))))))
|
|
|
|
|
;; rv
|
|
|
|
|
`((headers ,desc ,@headers)
|
|
|
|
|
(revisions ,@revs)))))
|
|
|
|
|
|
(vc-rcs-show-log-entry): New function.
(vc-rcs-checkin, vc-rcs-checkout): Don't set all properties.
(vc-rcs-register): If there is no RCS subdir, ask the
user whether to create one.
(vc-rcs-state-heuristic): Use
file-ownership-preserved-p.
(vc-rcs-checkout): Remove the error-handling for missing-rcs.
(vc-rcs-state-heuristic): Don't use file-writable-p.
(vc-rcs-print-log): Insert in the current buffer.
(vc-rcs-diff): Insert in the current buffer and remove unused arg
CMP.
(vc-rcs-workfile-unchanged-p): Use vc-do-command
instead of vc-simple-command.
(vc-rcs-fetch-master-state): Removed check for unlocked-changes to
avoid doing a diff when opening a file.
(vc-rcs-state): Added check for unlocked-changes.
(vc-rcs-header): Escape Id.
(vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
(vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
version.
(vc-rcs-state-heuristic): Use file-writable-p instead
of comparing userids.
(vc-rcs-fetch-master-state): Handle the case where rcs is missing.
Simplify the logic by eliminating unreachable code.
(vc-rcs-diff): Only pass `2' to vc-do-command if necessary and
just do a recursive call if we need to retry.
(vc-rcs-checkout): Handle the case where rcs is missing by making
the buffer read-write if requested and re-signalling the error.
(vc-rcs-find-most-recent-rev): New function. The code
derives from the old vc-parse-buffer but uses the revision number
rather than the date (much easier to compare robustly).
(vc-rcs-fetch-master-state): Use `with-temp-buffer'. Adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev). Find the
locking-user more directly. Check strict locking and set
checkout-model appropriately.
(vc-rcs-parse-locks): Remove.
(vc-rcs-latest-on-branch-p): Use with-temp-buffer and adapt to the
new vc-parse-buffer (and vc-rcs-find-most-recent-rev).
(vc-rcs-system-release): Use with-current-buffer and
vc-parse-buffer.
(vc-rcs-register, vc-rcs-checkout): Use with-current-buffer.
Merge in code
from vc-rcs-hooks.el. Don't require 'vc anymore.
(vc-rcs-responsible-p): Use expand-file-name instead of concat and
file-directory-p instead of file-exists-p.
(vc-rcs-exists): Remove.
(vc-rcs-header): New var.
Update Copyright.
(vc-rcs-rename-file): New function.
(vc-rcs-diff): Remove unused `backend' variable.
(vc-rcs-clear-headers): New function; code moved here
from vc-clear-headers in vc.el.
(tail): Provide vc-rcs and remove vc-rcs-logentry-check.
(vc-rcs-register): Parse command output to find master
file name and workfile version.
(vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
Require vc and vc-rcs-hooks.
(vc-rcs-trunk-p, vc-rcs-branch-part): Move to vc-rcs-hooks.
(vc-rcs-backend-release-p): Remove (use vc-rcs-release-p).
(vc-release-greater-or-equal-p): Move from vc.
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part,
vc-rcs-minor-part, vc-rcs-previous-version): Remove duplicates.
(vc-rcs-checkout): Add a missing `new-version' argument in the
call to vc-rcs-latest-on-branch-p. Hopefully that was the right
one.
(vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
Updated everything to use `vc-checkout-model'.
(vc-rcs-backend-release-p): function added. other
stuff updated to reference this function instead of the old
`vc-backend-release-p'.
(vc-rcs-logentry-check): Function added.
(vc-rcs-checkin, vc-rcs-previous-version)
(vc-rcs-checkout): Name space cleaned up. No more revision number
crunching function names that are not prefixed with vc-rcs.
(vc-rcs-checkout-model): Function added. References to
`vc-checkout-model' replaced.
(vc-rcs-admin): Added the query-only option as
required by the vc.el file.
(vc-rcs-exists): Function added.
(vc-*-checkout):
Use with-temp-file instead of /bin/sh. Merged from mainline
(vc-rcs-latest-on-branch-p): Moved to vc-rcs-hooks.el.
(vc-rcs-latest-on-branch-p, vc-rcs-trunk-p)
(vc-rcs-branch-p, vc-rcs-branch-part, vc-rcs-minor-part)
(vc-rcs-previous-version): Functions added.
(vc-rcs-diff): Function added.
(vc-rcs-checkout) Bug (typo) found and fixed.
(vc-rcs-register-switches) Variable `vc-rcs-register-switches' added.
Require vc when compiling.
(vc-rcs-print-log, vc-rcs-assign-name, vc-rcs-merge)
(vc-rcs-check-headers, vc-rcs-steal, vc-rcs-uncheck, vc-rcs-revert)
(vc-rcs-checkin): New functions (code from vc.el).
(vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
Doc fix.
(vc-rcs-release): Deleted. (Duplicated vc-rcs-system-release).
(vc-rcs-trunk-p, vc-rcs-branch-p, vc-rcs-branch-part)
(vc-rcs-minor-part, vc-rcs-previous-version, vc-rcs-release)
(vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
from vc.el.
(vc-rcs-system-release):
Renamed from vc-rcs-backend-release.
2000-09-04 19:47:43 +00:00
|
|
|
|
(provide 'vc-rcs)
|
|
|
|
|
|
|
|
|
|
;;; vc-rcs.el ends here
|