(vc-exec-after, vc-set-async-update, vc-default-dir-printer)
(vc-resynch-buffer, vc-dir-refresh): Declare.
(vc-setup-buffer, vc-switches): Autoload.
+ * vc/vc-cvs.el (vc-exec-after, vc-coding-system-for-diff)
+ (vc-resynch-buffer): Declare.
+ (vc-switches, vc-default-revert, vc-version-backup-file): Autoload.
* vc/vc-dir.el (desktop-missing-file-warning): Declare.
+ * vc/vc-git.el (vc-exec-after, vc-set-async-update)
+ (grep-read-regexp, grep-read-files, grep-expand-template)
+ (vc-dir-refresh): Declare.
+ (vc-setup-buffer, vc-switches, vc-resynch-buffer): Autoload.
+ * vc/vc-hg.el (vc-exec-after, vc-set-async-update): Declare.
+ (vc-setup-buffer, vc-switches, vc-do-async-command): Autoload.
* vc/vc-mtn.el (vc-exec-after): Declare.
(vc-switches): Autoload.
* vc/vc-rcs.el (vc-expand-dirs, vc-switches)
(vc-tag-precondition, vc-buffer-sync, vc-rename-master): Autoload.
(vc-file-tree-walk): Declare.
+ * vc/vc-sccs.el (vc-file-tree-walk): Declare.
+ (vc-expand-dirs, vc-switches, vc-setup-buffer, vc-delistify)
+ (vc-tag-precondition, vc-rename-master): Autoload.
* vc/vc-svn.el (vc-exec-after): Declare.
(vc-switches, vc-setup-buffer): Autoload.
* obsolete/vc-mcvs.el (vc-checkout, vc-switches, vc-default-revert):
;;; State-changing functions
;;;
+(autoload 'vc-switches "vc")
+
(defun vc-cvs-register (files &optional _rev comment)
"Register FILES into the CVS version-control system.
COMMENT can be used to provide an initial description of FILES.
(defun vc-cvs-delete-file (file)
(vc-cvs-command nil 0 file "remove" "-f"))
+(autoload 'vc-default-revert "vc")
+
(defun vc-cvs-revert (file &optional contents-done)
"Revert FILE to the working revision on which it was based."
(vc-default-revert 'CVS file contents-done)
;;;
(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
+;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
(defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
"Get comment history of a file."
(vc-call-backend 'RCS 'comment-history file))
+(autoload 'vc-version-backup-file "vc")
+(declare-function vc-coding-system-for-diff "vc" (file))
+
(defun vc-cvs-diff (files &optional oldvers newvers buffer)
"Get a difference report using CVS between two revisions of FILE."
(let* (process-file-side-effects
(vc-cvs-command nil 0 dir "tag" "-c" (if branchp "-b") name)
(when branchp (vc-cvs-command nil 0 dir "update" "-r" name)))
+;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher.
+(declare-function vc-resynch-buffer "vc-dispatcher"
+ (file &optional keep noquery reset-vc-info))
+
(defun vc-cvs-retrieve-tag (dir name update)
"Retrieve a tag at and below DIR.
NAME is the name of the tag; if it is empty, do a `cvs update'.
(when next-stage
(vc-git-dir-status-goto-stage next-stage files update-function))))
+;; Follows vc-git-command (or vc-do-async-command), which uses vc-do-command
+;; from vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
+;; Follows vc-exec-after.
+(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
+
(defun vc-git-dir-status-goto-stage (stage files update-function)
(erase-buffer)
(pcase stage
;;; HISTORY FUNCTIONS
+(autoload 'vc-setup-buffer "vc-dispatcher")
+
(defun vc-git-print-log (files buffer &optional shortlog start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'.
(indent-region (point-min) (point-max) 2)
(buffer-string))))
+(autoload 'vc-switches "vc")
+
(defun vc-git-diff (files &optional rev1 rev2 buffer)
"Get a difference report using Git between two revisions of FILES."
(let (process-file-side-effects)
(or (vc-file-getprop file 'git-root)
(vc-file-setprop file 'git-root (vc-find-root file ".git"))))
+;; grep-compute-defaults autoloads grep.
+(declare-function grep-read-regexp "grep" ())
+(declare-function grep-read-files "grep" (regexp))
+(declare-function grep-expand-template "grep"
+ (template &optional regexp files dir excl))
+
;; Derived from `lgrep'.
(defun vc-git-grep (regexp &optional files dir)
"Run git grep, searching for REGEXP in FILES in directory DIR.
(if (eq next-error-last-buffer (current-buffer))
(setq default-directory dir))))))
+;; Everywhere but here, follows vc-git-command, which uses vc-do-command
+;; from vc-dispatcher.
+(autoload 'vc-resynch-buffer "vc-dispatcher")
+
(defun vc-git-stash (name)
"Create a stash."
(interactive "sStash name: ")
(match-string 1)
(error "Cannot find stash at point"))))
+;; vc-git-stash-delete-at-point must be called from a vc-dir buffer.
+(declare-function vc-dir-refresh "vc-dir" ())
+
(defun vc-git-stash-delete-at-point ()
(interactive)
(let ((stash (vc-git-stash-get-at-point (point))))
(repeat :tag "Argument List" :value ("") string))
:group 'vc-hg)
+(autoload 'vc-setup-buffer "vc-dispatcher")
+
(defun vc-hg-print-log (files buffer &optional shortlog start-revision limit)
"Print commit log associated with FILES into specified BUFFER.
If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'.
("^tag: +\\([^ ]+\\)$" (1 'highlight))
("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))))
+(autoload 'vc-switches "vc")
+
(defun vc-hg-diff (files &optional oldvers newvers buffer)
"Get a difference report using hg between two revisions of FILES."
(let* ((firstfile (car files))
(forward-line))
(funcall update-function result)))
+;; Follows vc-hg-command (or vc-do-async-command), which uses vc-do-command
+;; from vc-dispatcher.
+(declare-function vc-exec-after "vc-dispatcher" (code))
+;; Follows vc-exec-after.
+(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
+
(defun vc-hg-dir-status (dir update-function)
(vc-hg-command (current-buffer) 'async dir "status" "-C")
(vc-exec-after
;; modified files
"Value of `compilation-error-regexp-alist' in *vc-hg* buffers.")
+(autoload 'vc-do-async-command "vc-dispatcher")
+
(defun vc-hg-pull (prompt)
"Issue a Mercurial pull command.
If called interactively with a set of marked Log View buffers,
(vc-sccs-state file))))
(vc-sccs-state file)))
+(autoload 'vc-expand-dirs "vc")
+
(defun vc-sccs-dir-status (dir update-function)
;; FIXME: this function should be rewritten, using `vc-expand-dirs'
;; is not TRTD because it returns files from multiple backends.
;; SCCS is totally file-oriented, so all we have to do is make the directory
(make-directory "SCCS"))
+(autoload 'vc-switches "vc")
+
(defun vc-sccs-register (files &optional rev comment)
"Register FILES into the SCCS version-control system.
REV is the optional revision number for the file. COMMENT can be used
(vc-sccs-do-command buffer 0 "prs" (mapcar 'vc-name files))
(when limit 'limit-unsupported))
+(autoload 'vc-setup-buffer "vc-dispatcher")
+(autoload 'vc-delistify "vc-dispatcher")
+
;; FIXME use sccsdiff if present?
(defun vc-sccs-diff (files &optional oldvers newvers buffer)
"Get a difference report using SCCS between two filesets."
;;; our own set of name-to-revision mappings.
;;;
+(autoload 'vc-tag-precondition "vc")
+(declare-function vc-file-tree-walk "vc" (dirname func &rest args))
+
(defun vc-sccs-create-tag (dir name branchp)
(when branchp
(error "SCCS backend does not support module branches"))
(goto-char (point-min))
(re-search-forward "%[A-Z]%" nil t)))
+(autoload 'vc-rename-master "vc")
+
(defun vc-sccs-rename-file (old new)
;; Move the master file (using vc-rcs-master-templates).
(vc-rename-master (vc-name old) new vc-sccs-master-templates)