1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00
Commit Graph

67 Commits

Author SHA1 Message Date
André Spiegel
719dcee97b (vc-fetch-master-properties): Call "cvs status" in the right
directory, passing only the nondirectory part of the file name.
(vc-find-cvs-master): Bind `mtime' locally instead of using it as a
free variable.
1995-09-14 07:23:43 +00:00
André Spiegel
aadce164da (vc-locking-user): Fixed wrong parentheses. 1995-09-08 20:38:53 +00:00
André Spiegel
b23a2306f7 (vc-utc-string): New function.
(vc-find-cvs-master): Use it to compare mtime and checkout time.
(vc-locking-user): CVS case: *only* use checkout time.
(vc-find-cvs-master): Don't attempt to find the RCS master file.
Throw the full name of CVS/Entries.
(vc-name): Doc change (special CVS case).
(vc-after-save): Handle the case when a file is saved in the very
second in which it was checked out.
1995-08-29 10:47:45 +00:00
André Spiegel
d270fe6e2d (vc-fetch-master-properties): Count cvs status "Needs Patch" as
`needs-checkout'.
(vc-after-save): Clear the cvs status.
1995-08-25 18:35:32 +00:00
André Spiegel
7064821ce7 (vc-simple-command): New function.
(vc-fetch-master-properties): CVS case: Use it.
(vc-lock-from-permissions, vc-file-owner, vc-rcs-lock-from-diff):
New functions.
(vc-locking-user): Largely rewritten.  Uses the above, handles RCS
non-strict locking.  Under CVS in CVSREAD-mode, learn the locking state
from the permissions.
(vc-find-cvs-master): Use vc-insert-file, rather than
find-file-noselect. Greatly speeds up things.
(vc-consult-rcs-headers): Bug fix, return status in all cases.
1995-08-22 17:52:42 +00:00
André Spiegel
e66eac08b5 (vc-fetch-master-properties): RCS case: get locking mode.
CVS case: new state `locally-added'.
(vc-locking-user): Under RCS with non-strict locking, don't trust
the file permissions.  CVS case: change which states count as
"locked".
(vc-consult-rcs-headers): Streamlined. Don't set vc-locking-user if
this is called under CVS.  Under RCS, use a heuristic to find the
value of vc-checkout-model without examining the master file.
(vc-parse-locks): Set vc-checkout-model.
(vc-status): Comment change.
(vc-after-save-hook, vc-after-save): The former renamed to the
latter. Now unconditionally called by `basic-save-buffer', determines
whether the buffer should be "locked" or not.
(vc-mode-line): No longer use dynamic after-save-hook. Changed
references to `automatic' into `implicit'.
(vc-checkout-model): Values are now `manual' and `implicit'.  Derive
the property on a per-file basis, supporting all possible modes.
1995-08-21 19:25:52 +00:00
André Spiegel
04446ed0c2 (vc-fetch-master-properties): Recognize cvs status "Unresolved Conflict".
(vc-locking-user): Count cvs status `unresolved-conflict' as "locked".
(vc-checkout-model): New property and access function (still simplistic).
(vc-after-save-hook): New function.
(vc-mode-line): When the file is locked by somebody else, make the
buffer read-only.  (Formerly this was only done for root.)  Don't
write-protect the buffer if the file is unlocked.  Instead, install
vc-after-save-hook, which "locks" the file when modifications are
saved.
1995-08-18 20:22:53 +00:00
André Spiegel
af5e65b996 (vc-top-version): Renamed to vc-master-workfile-version. Updated all
references.
1995-08-17 13:29:31 +00:00
Richard M. Stallman
45fc7cc3c5 (vc-mode-line, vc-find-file-hook): Moved the test for
version-controlled symbolic link from the former to the latter.
1995-07-18 20:55:46 +00:00
Karl Heuer
7b0e1b8f6c (vc-mode-line): Don't write-protect a
VC-Log buffer.  Better mode line text for initial comments.
Streamlined the function.
(vc-locking-user): Consider a cvs file "locked"
if its status is either 'locally-modified or 'needs-merge.
(vc-workfile-version): Catch 'found when calling vc-find-cvs-master.
(vc-fetch-master-properties): Handle cvs status "Needs Checkout".
This is intended for future use.
(vc-fetch-master-properties): Shrink the window
that displays the error message.
1995-07-17 22:56:28 +00:00
Richard M. Stallman
e11a39dfe9 (vc-fetch-master-properties): Better error
message in case the "cvs status" command fails.
1995-07-07 13:24:31 +00:00
Richard M. Stallman
ce27f2642e (vc-consult-rcs-headers): Use an even more
pedantic regexp to match RCS time strings.  Improved
efficiency by using looking-at instead of re-search "\\=...
1995-06-27 19:06:15 +00:00
Richard M. Stallman
58c59fd7af (vc-consult-rcs-headers): Handle the new time
string formats of RCS 5.7.
1995-06-26 20:51:15 +00:00
Richard M. Stallman
07de4c3d64 (vc-insert-file): Erase the current buffer before inserting the file.
(vc-fetch-master-properties, vc-fetch-properties): Don't erase the
buffer because that is now done in vc-insert-file.
(vc-fetch-properties): Kill the *vc-info* buffer when done.
1995-06-23 22:46:56 +00:00
Richard M. Stallman
0b086efb1f (vc-fetch-master-properties): Pass an absolute
pathname to the cvs status command. This is required to make
recursive vc-directory listings work.
1995-06-22 16:23:52 +00:00
Richard M. Stallman
ee526b5552 (vc-fetch-properties): Add save-excursion. 1995-06-20 02:56:43 +00:00
Richard M. Stallman
3be2a3627f (vc-fetch-master-properties): Be more careful
about killing the *vc-info* buffer.
1995-06-20 01:07:28 +00:00
Richard M. Stallman
0409429086 (vc-fetch-master-properties): Use path-separator
for path to "cvs status" command.
1995-06-18 13:42:43 +00:00
Richard M. Stallman
fceee0072d (vc-consult-rcs-headers): Fix typo in prev change. 1995-06-16 13:09:50 +00:00
Richard M. Stallman
1efcbf46bc (vc-fetch-master-properties): For RCS file,
don't look for vc-latest-version and vc-your-latest-version here.
Read only through ^locks unless we need to find the tip of a branch.
(vc-consult-rcs-headers): Use non-regexp search to find the headers.
(vc-latest-version, vc-your-latest-version): Use vc-fetch-properties.
(vc-fetch-properties): New function.
1995-06-16 01:04:27 +00:00
Richard M. Stallman
02d383ebf9 The RCS status is now found by reading the
master file directly, instead of using rlog.  The properties
retrieved from the master file are kept separately.  The two
main properties, `vc-workfile-version' and `vc-locking-user',
are inferred from those master file properties if the
information cannot be found elsehow.  All properties are
consistently cached now.

(vc-master-info, vc-log-info, vc-fetch-properties): functions
removed.  Their job is now done by `vc-fetch-master-properties'
and `vc-insert-file'.

(vc-fetch-master-properties):  new function, replaces
vc-fetch-properties.  Retrieves all the properties that can be
found in the master file, for all three backends (calls
`cvs status' in the CVS case).

(vc-insert-file):  new function.  Inserts an arbitrary file
into the current buffer, optionally chunkwise, until a certain
regexp shows up.

(vc-parse-locks):  new function.  Translates SCCS or RCS lock
lists, as found in the master files, into lisp lists.  Sets
the new property `vc-master-locks'.

(vc-locked-version):  property removed.  Was unnecessary, and
only referenced in vc-hooks.el.
(vc-head-version, vc-default-branch, vc-master-locks):
new properties.

(vc-top-version):  new name for the old property
`vc-branch-version'.  ("top-version" is better because it
might also be the RCS "head" if there is no default branch.)

(vc-master-locking-user):  replaces `vc-true-locking-user'.
Scans the new `vc-master-locks' property, yielding the master
file's idea of who is locking the current workfile version.

(vc-locking-user):  slightly changed to use the new properties.
Changed the actual property value for an unlocked file to
'none.  This is to distinguish it from an unknown locking
state, which is represented by nil.  The function vc-locking-user
returns nil if the property is 'none, to make it compatible with
the rest of VC.

(vc-consult-rcs-headers, vc-master-locking-user):  adpated to
the new 'none-value of vc-locking-user.

(vc-consult-rcs-headers): fixed bug that prevented
(not vc-consult-headers) from working

(vc-file-not-found-hook): set the default-directory of the new
buffer before check-out. (Otherwise, setting vc-keep-workfiles
to nil doesn't work.)

(vc-occurences, vc-branch-p): functions removed (no longer needed)

Reordered some defuns so they are grouped in a logical way.
1995-06-15 23:06:45 +00:00
Karl Heuer
76a8bf4c1f (vc-menu-map): Disable Register when no visited file. 1995-06-07 18:55:22 +00:00
Karl Heuer
b525816e48 (vc-log-info): Use path-separator. 1995-05-27 00:36:04 +00:00
Roland McGrath
38179d4288 (vc-status): If vc-locking-user returns a number, compare it to (user-uid). 1995-05-12 16:39:32 +00:00
Karl Heuer
e1c0c2d1bf (vc-default-backend, vc-path, vc-consult-headers):
(vc-mistrust-permissions, vc-keep-workfiles): Customization
variables, moved here from vc.el.
(vc-trunk-p, vc-minor-revision, vc-branch-part): Moved to vc.el.
(vc-backend): Renamed from vc-backend-deduce.  Callers changed.
(vc-match-substring, vc-lock-file, vc-parse-buffer, vc-master-info):
(vc-log-info, vc-consult-rcs-headers, vc-fetch-properties):
(vc-backend-subdirectory-name, vc-locking-user, vc-true-locking-user):
(vc-latest-version, vc-your-latest-version, vc-branch-version):
(vc-workfile-version): Functions moved here from vc.el.
(vc-log-info): Log program is no longer called through vc-do-command,
to avoid including the lengthy vc-do-command here.  It is done
directly through call-process now.  Removed obsolete parameter LAST.
(vc-status): Replaced by the much simpler version that gets the
information from the file properties.  Removed the obsolete
parameter vc-type.
(vc-parse-buffer): changed format of PATTERNS.  Each pattern is now a
list of 2 to 3 elements, the first being the pattern, the remaining
ones the numbers of subexpressions to refer to.
(vc-cvs-status): New per-file property, only used in the CVS case.
(vc-cvs-status): New function.
(vc-log-info): Adapted to new version of vc-parse-buffer
(vc-fetch-properties): Adapted to new version of vc-parse-buffer.
Better search regexp for CVS latest version.
(vc-log-info): Search for branch version only in the RCS case,
since this doesn't make sense for SCCS or CVS.
(vc-fetch-properties): CVS case: set vc-cvs-status.
(vc-locking-user): CVS case: use vc-cvs-status to determine if
the file is up-to-date, thus avoiding an expensive call to
vc-workfile-unchanged-p.
(vc-mode-line): Re-activated the code that makes the buffer read-only
if the work file is unchanged.  But the status of the work file
is now determined by looking at the already-computed mode string.
1995-04-26 21:42:20 +00:00
Richard M. Stallman
f2ee419195 (vc-buffer-backend): New function.
Also new variable, local in all buffers.
(vc-kill-buffer-hook): Kill local vc-buffer-backend.

(vc-kill-buffer-hook): Don't put it on kill-buffer-hook.
(vc-file-clearprops): Function moved here.
(vc-workfile-version): Function moved here.
(vc-mode-line): Don't call vc-locking-user.

Add branch support for RCS;  treat CVS more like RCS and SCCS.
(vc-occurences, vc-trunk-p, vc-branch-p, vc-minor-revision)
(vc-branch-part): new functions that operate on RCS revision numbers.
(vc-status): Use the new property vc-workfile-version
and vc-locking-user (see vc.el).  Display "locking state" for CVS.
(vc-find-cvs-master): Search for file name case-sensitively, store
version number into the new property vc-workfile-version.
(vc-find-file-hook): kill any remaining properties.  Like this,
when re-finding a file (for example because it has changed on disk),
the version control state gets re-computed.
(vc-mode-line): CVS case: make the buffer read-only if the file
is unmodified.
(vc-kill-buffer-hook): Clear file's vc props when buffer is killed.
1995-04-26 10:15:03 +00:00
Richard M. Stallman
c844616ca6 (vc-toggle-read-only): Accept prefix arg
and pass it along to vc-next-action.
1994-12-15 16:38:05 +00:00
Roland McGrath
b662fbb8b8 Only define items in vc-menu-map if it is boundp. 1994-11-09 12:57:30 +00:00
Thien-Thi Nguyen
adc87157d8 Add maintainer line in header. 1994-11-07 08:29:06 +00:00
Richard M. Stallman
174edc1393 (vc-status): Handle CVS.
(vc-find-cvs-master): New function.
(vc-master-templates): Add vc-find-cvs-master.
(vc-registered): Allow vc-master-templates to contain atoms, and
call them with dirname and basename as arguments.

(vc-mode-line): Use equal, not string-equal, to
compare the result of vc-locking-user.
1994-10-03 21:56:50 +00:00
Richard M. Stallman
624c0e9d14 (vc-menu-map): Set up menu items.
(vc-status): Use vc-path when calling prs.

(vc-status): New arg vc-type.

(vc-file-not-found-hook): Use save-excursion.

(vc-status): Renamed from vc-rcs-status.  Handle SCCS.
(vc-display-status): Renamed from vc-rcs-status.
(vc-mode-line): Call vc-status for SCCS files too.
1994-09-22 02:48:14 +00:00
Richard M. Stallman
19021bfb36 (vc-mode-line): Do nothing if FILE is nil. 1994-05-19 21:58:38 +00:00
Richard M. Stallman
b993101e36 (vc-registered): Use find-file-name-handler. 1994-05-13 07:42:34 +00:00
Karl Heuer
8f1204db34 Update copyright. 1994-05-03 23:47:06 +00:00
Richard M. Stallman
1d88854875 (vc-mode-line): Fix previous change. 1994-04-29 06:25:49 +00:00
Richard M. Stallman
8d51c5cc39 (vc-mode-line): Warn if file is not vc-registered
but is a symlink to a vc-maintained file.
1994-04-24 10:00:51 +00:00
Richard M. Stallman
b5bcaf3ebb (vc-find-file-hook): Set backup-inhibited. 1994-03-27 19:46:27 +00:00
Richard M. Stallman
9228cfacd5 (vc-make-backup-files): Doc fix. 1994-02-04 23:01:27 +00:00
Eric S. Raymond
d4353b2055 (vc-mode-line): use force-mode-line-update instead of the Emacs 18
kluge.
1994-02-02 18:56:02 +00:00
Richard M. Stallman
4a7e63b938 (vc-mode-line): Make buffer read-only for root if file is locked. 1993-12-24 03:12:14 +00:00
Richard M. Stallman
5032bd2307 (vc-make-backup-files): Doc fix.
(vc-rcs-status): Use colon, not dash, in the string LOCKS.
1993-11-25 03:46:27 +00:00
Paul Eggert
c574acf031 (vc-prefix-map): Bind C-x v ~ to vc-version-other-window. 1993-09-15 23:19:13 +00:00
Paul Eggert
6379911ca3 (vc-find-file-hook, vc-file-not-found-hook): Use add-hook to install. 1993-08-27 01:57:48 +00:00
Paul Eggert
e6258b339a (vc-mode-line): Set vc-mode to nil if FILE no longer is version-controlled. 1993-07-29 04:58:47 +00:00
Paul Eggert
b6ff872167 (vc-rcs-status): Removing any trailing "-". 1993-07-27 19:28:46 +00:00
Paul Eggert
f5baea11cb (vc-rcs-status): Use "-", not " ", to separate locks, so that the RCS
minor mode doesn't contain internal spaces.
1993-07-20 02:25:19 +00:00
Paul Eggert
b0c901a35e (vc-rcs-status): Omit "LOCKER:" if you are the locker. 1993-07-19 04:03:52 +00:00
Richard M. Stallman
e4953cae72 (vc-rcs-status): Make work buffer's name start w/ space. 1993-07-15 05:49:21 +00:00
Paul Eggert
45c92c0c56 (vc-rcs-status): Include head version number in mode line if there
are no locks.
1993-07-12 22:04:35 +00:00
Paul Eggert
137fcf3148 (vc-rcs-status): Remove unused var `status'. 1993-07-07 19:07:54 +00:00