Commit graph

93 commits

Author SHA1 Message Date
Richard M. Stallman
9f49ec7384 (vc-find-cvs-master): Accept ...+ in a normal entry. 1997-05-04 06:49:53 +00:00
Richard M. Stallman
c20369f06c (vc-master-templates): Doc fix. 1997-04-27 20:50:24 +00:00
Richard M. Stallman
70b760ed2d (vc-find-cvs-master): Handle a "New file!" entry.
(vc-fetch-master-properties): Match "New file!".
1997-04-22 01:04:48 +00:00
André Spiegel
28a25aa5ea Changed my e-mail address in the header. 1997-01-03 13:51:36 +00:00
André Spiegel
2a11c6f32f (vc-user-login-name): New function.
(vc-fetch-master-properties, vc-lock-from-permissions, vc-file-owner,
vc-fetch-properties, vc-after-save, vc-mode-line, vc-status):  Use
`vc-user-login-name' instead of `user-login-name'.
1996-12-26 12:06:13 +00:00
André Spiegel
1525b5169d (vc-file-owner): Always return user name, using the optional argument
of user-login-name.
(vc-locking-user, vc-status): Discard checks for numerical value of
vc-locking-user.
1996-10-17 20:34:46 +00:00
André Spiegel
a93de381c1 (vc-find-cvs-master): Fixed handling of "locally added" files. 1996-09-16 14:44:22 +00:00
André Spiegel
79bdae7a23 (vc-file-owner): If the file is owned by somebody else, return the UID
as a string, so that the rest of VC can use it like a username.
1996-09-08 11:53:34 +00:00
Richard M. Stallman
defccde391 Comment changes. 1996-06-26 18:01:42 +00:00
Richard M. Stallman
9becbeca26 (vc-mode-line): If user is root, verify file really has user-writable bit. 1996-06-18 16:52:09 +00:00
Richard M. Stallman
227d2bed63 (vc-find-file-hook): Follow multiple links all the way. 1996-05-09 19:45:49 +00:00
Richard M. Stallman
566f2169f2 (vc-follow-link, vc-find-file-hook):
Use file-chase-links instead of file-truename.
(vc-find-file-hook): Follow a link without asking
if the target is already visited.
1996-05-05 03:52:13 +00:00
Richard M. Stallman
9596811a3d Comment change. 1996-03-02 06:37:35 +00:00
Paul Eggert
d5c8e97af5 (vc-find-cvs-master): Don't require a "/" after the modification time
in CVS/Entries, since the time may be followed by a conflict notice
(in CVS 1.7) or by some other value (in CVS 1.3).
1996-02-26 00:53:13 +00:00
Richard M. Stallman
d822195158 (vc-follow-link): Kill buffer before creating new one. 1996-02-26 00:19:35 +00:00
Richard M. Stallman
e7f5ddc2c8 (vc-follow-link): Simplify by taking advantage
of Feb 21 change in find-file-noselect.
1996-02-26 00:17:43 +00:00
André Spiegel
a3a3984834 (vc-follow-link): New function.
(vc-find-file-hook): Use it.
1996-02-22 13:07:58 +00:00
Karl Heuer
738efc8e5c Move all the put's for menu-enable props to top level.
(vc-next-action, vc-toggle-read-only): Enable whenever vc-mode.
1996-02-21 21:20:57 +00:00
Karl Heuer
555722598b (vc-consult-rcs-headers): Ignore text properties. 1996-02-14 04:32:55 +00:00
Paul Eggert
c18381d187 (vc-utc-string): Remove; it wasn't reliable near DST or leap-second
transitions.
(vc-find-cvs-master): Convert UTC string to encoded time and compare
the results to the file attributes, rather than attempting to convert
file attributes to UTC string (which wasn't reliable).
1996-01-20 20:42:06 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
André Spiegel
b806321282 (vc-follow-symlinks): New variable.
(vc-find-file-hook): Use it.
1996-01-10 15:27:49 +00:00
Karl Heuer
a7acbbe4d4 Comment fixes. 1996-01-05 22:21:28 +00:00
André Spiegel
9542081161 Better doc strings for a few variables. 1996-01-04 16:00:45 +00:00
Richard M. Stallman
10aa933d49 (vc-locking-user): In CVS case, convert user number to a string. 1995-11-16 22:04:24 +00:00
André Spiegel
318880476e (vc-utc-string): Use timezone of TIMEVAL for the correction, not the
current one.
(vc-rcsdiff-knows-brief): New variable.
(vc-rcs-lock-from-diff): Use it.
1995-11-02 09:35:04 +00:00
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