window configuration correctly.
(vc-next-action): Save window configuration for vc-next-action-dired.
(vc-finish-logentry): Only kill log buffer if it does exist.
(vc-dired-mode): Rewritten so that it works entirely through
dired-after-readin-hook. Subdirectories are handled just as in
ordinary dired.
(vc-dired-hook): New function.
(vc-state-info, vc-dired-reformat-line): Adapted.
(vc-dired-update, vc-dired-update-line): Removed.
(vc-directory): Rewritten.
(vc-directory-18): Removed.
(vc-dired-mark-locked): New function, bound to "*l" in vc-dired-mode.
(vc-do-command): Only compute vc-name if it is really needed.
(vc-fetch-cvs-status): New function.
(vc-dired-hook): Use it.
(vc-next-action-on-file): Use it.
(vc-backend-revert): For CVS, revert to the version the buffer was
based on, not the latest on the current branch (same behavior as
for RCS). For SCCS, forget vc-workfile-version so that it gets
recomputed.
(vc-revert-buffer): Rewrote doc string to explain the above.
(vc-finish-logentry): Don't add extra newline.
check-in, but file on disk has changed.
(vc-do-command): Consider LAST argument only if FILE is non-nil.
(vc-add-triple, vc-record-rename, vc-lookup-file): Find
vc-name-assoc-file based on vc-name of FILE.
(vc-backend-admin, vc-rename-file): Handle the SCCS PROJECTDIR feature.
(vc-do-command): Rewrote doc string.
(vc-restore-buffer-context): Restore point and mark only if they don't
match the context.
(vc-revert-buffer1, vc-clear-headers): Use save-excursion to relocate
point and mark, and vc-restore-buffer-context as a backup.
(vc-resynch-buffer): When operating on the current buffer, don't use
save-excursion, because that would undo the effects of the above
functions.
(vc-resynch-window): Deleted code that removed vc-find-file-hook
temporarily. This was unnecessary, because find-file-hooks are not
called when the buffer is reverted.
(vc-register): Added comment for prev change.
(vc-annotate-car-last-cons, vc-annotate-time-span):
Rename arg assoc-list to a-list.
(vc-annotate-display): All support for XEmacs extents removed.
Functions `set-face-*' are called only when a face is created.
(vc-backend-checkout): Use "cvs edit" for files with manual checkout.
(vc-minor-part, vc-previous-version): New functions.
(vc-diff): Don't ask or guess version numbers.
(vc-version-diff): Suggest default versions based on the file state.
number to compare with.
(vc-retrieve-snapshot): If no NAME is specified, check out
latest versions of all unlocked files.
(vc-next-action-on-file): For CVS files with implicit checkout: if
unmodified, don't do anything.
(vc-clear-headers): Regexp more restricted, so as not to destroy file
contents by mistake.
(vc-backend-merge-news): Better analysis of status reported by CVS.
Set file properties accordingly.
and put it into vc-annotate-mode-map.
(vc-annotate-add-menu): Don't init vc-annotate-mode-menu,
just add the bindings to it. Display progress messages.
(vc-annotate-mode-menu): New defvar.
(vc-annotate-ratio): Move defvar, add initial value.
(vc-annotate-display-default): Display progress messages.
(vc-annotate-display): Use vc-annotate-color-map.
vc-backend-checkout, vc-backend-steal): Use `vc-user-login-name'
instead of `user-login-name'.
(vc-update-change-log): If `user-full-name' is nil, try
`user-login-name'. Failing that, use uid as a string.
(vc-make-buffer-writable-hook): Removed (was unused).
(vc-backend-checkout): SCCS case: handle empty revision number.
(vc-diff): Don't pop to the *vc-diff* buffer if file is unchanged.
Better doc strings for a few variables.
(vc-directory): Take DIRNAME as an argument. Ask for it in
the minibuffer.
Don't kill pre-existing vc-dired buffers (dired now re-uses the
right one).
(vc-file-tree-walk): New argument DIRNAME. Updated all callers.
(vc-dired-update): New function. `g' in vc-dired-mode calls it.
(vc-dired-reformat-line): Handle different ls -l formats.
(vc-next-action-dired): Adjust default-directory before calling
vc-next-action-on-file.
(vc-next-action-on-file): Handle CVS merge in vc-dired-mode correctly.
(vc-next-action): Ask for a check-in comment if there are "added" CVS files.
Don't special-case single files in vc-dired-mode.
(vc-file-clear-masterprops): Typo fix.
(vc-latest-on-branch-p): Always true for CVS.
(vc-directory): Header change. Do display the buffer, even if no
locked/registered files were found.
Provide a better header. Corrected the check whether any files were
found at all (don't display a listing in this case). Under CVS,
display cvs-status rather than vc-locking-user.
(vc-next-action-on-file): When doing a check-in in vc-dired-mode, find
the file in another window.
(vc-next-action-dired): Update dired listing while processing the
files.
(vc-next-action): Check whether a check-in comment is really needed
for this mass operation.
(vc-checkout): Resynch the buffer, even if it's not current.
(vc-dired-state-info, vc-dired-update-line): New functions.
(vc-dired-prefix-map): Added local definition for `g' and `='.
(vc-dired-reformat-line): Simplified. Erase the hardlink count from
the listing, because it doesn't relate to version control.
(vc-rcs-release, vc-cvs-release, vc-sccs-release): New variables, may
be set by the user.
(vc-backend-release, vc-release-greater-or-equal, vc-backend-release-p):
New Functions.
(vc-do-command): Allow FILE to be nil.
(vc-backend-checkin): When creating a branch, don't bother to unlock
the old version if this is RCS 5.6.2 or higher.
(vc-next-action-on-file): Allow lock-stealing only if RCS 5.6.2 or
higher.
(vc-backend-admin, vc-backend-checkin): If available, use ci -i and -j.
Updated Developer's Notes.
added, but not yet committed.
(vc-backend-checkout): RCS case: In non-strict locking mode, force to
overwrite the writable workfile. CVS case: Do the right thing in
CVSREAD-mode.
(vc-backend-checkin): Clear master properties before doing the
check-in. In the CVS case, catch error and display an appropriate
message in the echo area.
(vc-backend-revert): Clear master properties, because some might get
outdated by the operation.
(vc-backend-merge-news): Scan the output of "cvs update" and find out
whether conflicts have occurred.
(vc-finish-logentry): Delete the *VC-log* buffer *before* doing the
actual check-in. That leads to a better display in case the check-in
fails.
(vc-latest-on-branch-p): Defined it for CVS in the obvious way.
(vc-next-action-on-file): Removed special CVS cases. At this level,
CVS is now mostly handled like the other backends.
(vc-backend-checkout): CVS case: Clear sticky tag as default when
doing a verbose checkout. (This used to be done in
vc-next-action-on-file.)
and vc-restore-buffer-context, so we can use it also in other
circumstances.
(vc-buffer-context, vc-restore-buffer-context): New functions.
(vc-clear-headers): New function, uses the above.
(vc-cancel-version): When `norevert', locks the most recent remaining
version. Also, refuse to work on anything but the latest version of
a branch. Removed the check whether the version is the user's,
because that is difficult to decide, now that multiple branches are
possible.
(vc-latest-on-branch-p): New function.
(vc-head-version): New access function to the already existing
property.
(vc-trunk-p, vc-branch-part): Functions moved before first use.
(vc-locked-example): Renamed to vc-snapshot-precondition. It now also
checks whether any of the files are visited.
(vc-retrieve-snapshot): If any files are visited, ask whether to
revert their buffers. Use vc-backend-checkout and vc-resynch-buffer
to do that, instead of vc-checkout.
(vc-backend-checkout): Adjust default-directory so that the
checked-out file goes to the right place.
if nil, is *vc*). Updated all callers.
(vc-next-action-on-file, vc-diff, vc-version-diff, vc-backend-diff):
Use buffer *vc-diff* for diff output instead of *vc*.
(vc-add-triple, vc-lookup-triple, vc-record-rename):
Use absolute file names to access the SCCS named configuration files
("VC-names").
(vc-retrieve-snapshot): Use vc-checkout instead of
vc-backend-checkout, as the former also updates the current buffer.
(vc-file-tree-walk, vc-file-tree-walk-internal): Use
expand-file-name, so that FUNC gets called with an unabbreviated name.
'none-value of vc-locking-user, and the consistent caching
of all properties. Especially, make the properties survive
check-ins and check-outs. Various minor bug fixes.
(vc-file-clear-masterprops): New function.
(vc-backend-checkin, vc-backend-revert): Set vc-locking-user
to 'none if the file is unlocked.
(vc-backend-checkin, vc-backend-revert, vc-backend-checkout):
Use vc-file-clear-masterprops, and adjust those properties
that are not cleared.
(vc-resynch-window): Temporarily remove vc-find-file-hook, so
that we don't lose the file properties during check-in/out.
(vc-resynch-window): Do not try to delete the current window if
`vc-keep-workfiles' is nil (doesn't make sense; killing the
buffer is enough.)
(vc-backend-checkin): Rewrote the code that adjusts the default
branch and removes any locks that might remain after check-in.
(vc-cancel-version): Abort with error message in the CVS case.
(The error used to be signalled in vc-backend-uncheck, which is
a little too late.)
(vc-minor-revision): Function removed.
(vc-default-backend, vc-keep-workfiles, vc-consult-headers):
(vc-mistrust-permissions, vc-path): Vars moved to vc-hooks.el.
(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 to vc-hooks.el.
(vc-trunk-p, vc-minor-revision, vc-branch-part): Functions moved
here from vc-hooks.el.
properly to vc-do-command.
(vc-update-change-log): Use vc-buffer-backend in menu-enable.
(vc-file-clearprops, vc-workfile-version): Functions moved to vc-hooks.el.
Add branch support for RCS; treat CVS more like RCS and SCCS.
(vc-next-action-on-file): changed CVS handling, such that C-x C-q
works as with RCS and SCCS.
(vc-consult-rcs-headers): New function.
(vc-branch-version): New per-file property, refers
to the RCS version selected by `rcs -b'.
(vc-workfile-version): New function. Also new per-file property
(vc-consult-headers): New parameter variable.
(vc-mistrust-permissions): Default set to `nil'.
(vc-locking-user): Property is now cached. The other functions
update it as necessary. Attempts to use RCS headers if enabled.
(vc-log-info, vc-parse-buffer): Various bug fixes. Added support
for property `vc-branch-version'.
(vc-backend-checkout): RCS case: if no explicit version
is specified, check out `vc-workfile-version'. After check-out,
set `vc-workfile-version' according to the version number
reported by "co".
(vc-backend-checkin): RCS case: remove any remaining locks
if a new branch was created. After every check-in, adjust
the current branch using `rcs -b' (this cannot be avoided).
CVS case: allow for explicit checkin, but only on the trunk.
(vc-next-action-on-file, vc-backend-checkout, vc-backend-checkin,
vc-backend-revert, vc-backend-diff): Explicitly use
vc-workfile-version as the default version to operate on.
in *vc* to be re-set each time this function uses it.
Discard current dir from front of FILE later on,
and only if last = `WORKFILE'.
Undo Dec 10 change:
(vc-directory, vc-dired-reformat-line): Changed back.
(vc-directory-18): Old function restored.
(vc-dir-all-files): Function deleted.
(vc-next-action-on-file): If file is not registered,
check file out after registering it.
(vc-next-action-dired): Restore the window configuration after
doing vc-next-action on each file in a VC-dired buffer.
(file-regular-p-18): New function.
(file-regular-p): Define, if not already defined.
away relative-pathname information. This function no longer sets the
default directory. Also, mark the *vc* output buffer unmodified.
(vc-revert-buffer1): Handle font-lock mode correctly.
(vc-diff, vc-print-log): vc-do-command no longer sets the default
directory, but doing so is advantageous for these cases.
(file-executable-p-18): Better portability to Emacs 18.
(vc-directory-exclusion-list, vc-file-tree-walk-internal):
Implement the new variable vc-directory-exclusion-list to prune
tree walks. Initial value tells it to ignore SCCS and RCS subdirectories.
immediately checked out again, so set vc-checkout-time.
(vc-fetch-properties): CVS 1.4A1 says "Repository revision".
(vc-locking-user): Do something sensible when the backend
is CVS. May return a numerical UID or a string when CVS is used.
(vc-dired-reformat-line): Handle numerical arguments.
(vc-backend-checkout): Don't extract CVS files twice.
(vc-next-action-on-file): Handle return value from
vc-backend-merge-news correctly.
(vc-rename-file): Fixed call to vc-backend-dispatch.
(vc-make-buffer-writable-hook): New hook, for CVS only.
(vc-header-alist): Added header for CVS.
(vc-next-action-on-file): Added support for CVS.
(vc-next-action, vc-checkin, vc-revert-buffer): Doc fixes.
(vc-rename-file): Disable if the backend is CVS.
(vc-log-info): New arguments: LAST and FLAGS, passed on to
vc-do-command. All callers updated.
(vc-fetch-properties): Implement support for CVS files.
(vc-backend-checkin): Args REV and COMMENT no longer optional.
Implement support for CVS.
(vc-backend-revert): Implement support for CVS.
(vc-backend-diff): Treat files which are added, but not yet committed,
specially (diff them against /dev/null).
(vc-backend-merge-news): New function.
(vc-log-mode): Talk a little about CVS in the comment.
(vc-log-info): Simplify code.
(vc-do-command): New argument LAST. All callers updated.
Legal values for LAST are 'MASTER and 'BASE.
(vc-backend-dispatch): New argument C, used by CVS. All callers
updated, but many just passes an (error "NYI") form.
(vc-backend-admin): Issue a "cvs add" (but not a "cvs commit").
(vc-backend-checkout, vc-backend-logentry-check, vc-backend-print-log,
vc-backend-assign-name, vc-backend-diff, vc-check-headers): Handle CVS.
(vc-backend-steal, vc-backend-uncheck): Give error if using CVS.
(vc-backend-diff): Fixed typo in SCCS code.
to discard the extra arg some shells make.
(vc-rename-file): Add autoload cookie.
(vc-steal-lock): (1) Function should be non-interactive, because it
doesn't work when called directly by the user. (2) Don't display
revision "nil" when stealing lock if revision is unknown. (3) Put
"Stolen lock on <file>" instead of just the file name in the Subject
of the notification message.
Set vc-log-operation-hook locally.
(vc-next-action-on-file): Not here.
(vc-admin): Pass new arg.
(vc-checkin): Pass new arg instead of setting vc-log-operation-hook.
specifying whether we want to compute the differences if the
file is changed. Otherwise, use cmp instead of diff.
(vc-next-action-on-file): Use new vc-workfile-unchanged-p option;
this avoids recomputing the differences in some cases.
(vc-backend-diff): OLDVERS is now optional; all callers changed.
New optional argument CMP says to use `cmp' rather than `diff'.
allows vc-next-action on all marked files in a dired buffer to work.
(vc-finish-logentry) There isn't necessarily a *VC-log-entry* buffer
to remove if this function was called from within a dired buffer. Fix
its handling of this case.
working file ourselves; that way, if `co' fails, we won't have
deleted the working file.
(vc-backend-steal): Don't delete the working file. Use `rcs -u -l',
not `rcs -u ; rcs -l'; it's faster. Use vc-backend-dispatch -- the
old code couldn't have possibly worked.
add-change-log-entry-other-window. Call add-change-log-entry instead of
add-change-log-entry-other-window; pass it t for OTHER-WINDOW and NEW-ENTRY
args. Go to bol before filling.
FILE before passing it to vc-mode-line. Everyplace else passes
vc-mode-line full filenames, and vc-mode-line now needs the real
file name to decide which version-control system the file is under.