diff options
| author | Eric S. Raymond | 2014-11-20 02:37:06 -0500 |
|---|---|---|
| committer | Eric S. Raymond | 2014-11-20 02:37:06 -0500 |
| commit | f83109f0fabe13c0175ca6fe23b475bd8a9d9d99 (patch) | |
| tree | 8cccade7f4f1b9226dd3e2a09a3c5c73d6b704ed | |
| parent | f5d77aafa9d59c4afb13d744e67a0e4daf3be31a (diff) | |
| download | emacs-f83109f0fabe13c0175ca6fe23b475bd8a9d9d99.tar.gz emacs-f83109f0fabe13c0175ca6fe23b475bd8a9d9d99.zip | |
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...
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/vc/vc-arch.el | 3 | ||||
| -rw-r--r-- | lisp/vc/vc-bzr.el | 6 | ||||
| -rw-r--r-- | lisp/vc/vc-cvs.el | 49 | ||||
| -rw-r--r-- | lisp/vc/vc-dav.el | 6 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-hg.el | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-mtn.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-rcs.el | 16 | ||||
| -rw-r--r-- | lisp/vc/vc-sccs.el | 3 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 3 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 28 |
12 files changed, 74 insertions, 57 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6fa23de0244..2020fd34f37 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2014-11-20 Eric S. Raymond <esr@snark> | ||
| 2 | |||
| 3 | * vc/vc-arch.el, vc/vc-bzr.el, vc/vc-cvs.el, vc/vc-dav.el, | ||
| 4 | vc/vc-git.el, vc/vc-hg.el, vc/vc-mtn.el, vc/vc-rcs.el, | ||
| 5 | vc/vc-sccs.el, vc/vc-svn.el, vc/vc.el: Remove never-used rev | ||
| 6 | argument from the backend checkin methods. Only the RCS, SCCS, and | ||
| 7 | CVS back ends tried to do anything with it, and that code was | ||
| 8 | never exercised. Chiseling away the cruft of decades... | ||
| 9 | |||
| 1 | 2014-11-19 Lars Magne Ingebrigtsen <larsi@gnus.org> | 10 | 2014-11-19 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 11 | ||
| 3 | * net/eww.el (eww-render): Remove a no-op :title setting. | 12 | * net/eww.el (eww-render): Remove a no-op :title setting. |
diff --git a/lisp/vc/vc-arch.el b/lisp/vc/vc-arch.el index 2bc8b7b4339..53b8e35ff93 100644 --- a/lisp/vc/vc-arch.el +++ b/lisp/vc/vc-arch.el | |||
| @@ -441,8 +441,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see | |||
| 441 | 441 | ||
| 442 | (autoload 'vc-switches "vc") | 442 | (autoload 'vc-switches "vc") |
| 443 | 443 | ||
| 444 | (defun vc-arch-checkin (files rev comment) | 444 | (defun vc-arch-checkin (files comment) |
| 445 | (if rev (error "Committing to a specific revision is unsupported")) | ||
| 446 | ;; FIXME: This implementation probably only works for singleton filesets | 445 | ;; FIXME: This implementation probably only works for singleton filesets |
| 447 | (let ((summary (file-relative-name (car files) (vc-arch-root (car files))))) | 446 | (let ((summary (file-relative-name (car files) (vc-arch-root (car files))))) |
| 448 | ;; Extract a summary from the comment. | 447 | ;; Extract a summary from the comment. |
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index a093bcb6b92..2c1941bf6a8 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el | |||
| @@ -634,10 +634,8 @@ or a superior directory.") | |||
| 634 | "" (replace-regexp-in-string | 634 | "" (replace-regexp-in-string |
| 635 | "\n[ \t]?" " " str))))) | 635 | "\n[ \t]?" " " str))))) |
| 636 | 636 | ||
| 637 | (defun vc-bzr-checkin (files rev comment) | 637 | (defun vc-bzr-checkin (files comment) |
| 638 | "Check FILES in to bzr with log message COMMENT. | 638 | "Check FILES in to bzr with log message COMMENT." |
| 639 | REV non-nil gets an error." | ||
| 640 | (if rev (error "Can't check in a specific revision with bzr")) | ||
| 641 | (apply 'vc-bzr-command "commit" nil 0 files | 639 | (apply 'vc-bzr-command "commit" nil 0 files |
| 642 | (cons "-m" (log-edit-extract-headers | 640 | (cons "-m" (log-edit-extract-headers |
| 643 | `(("Author" . ,(vc-bzr--sanitize-header "--author")) | 641 | `(("Author" . ,(vc-bzr--sanitize-header "--author")) |
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index ad5559bb699..6fbfa727138 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el | |||
| @@ -321,20 +321,38 @@ its parents." | |||
| 321 | (directory-file-name dir)))) | 321 | (directory-file-name dir)))) |
| 322 | (eq dir t))) | 322 | (eq dir t))) |
| 323 | 323 | ||
| 324 | (defun vc-cvs-checkin (files rev comment) | 324 | ;; vc-cvs-checkin used to take a 'rev' second argument that allowed |
| 325 | ;; checking in onto a specified branch tip rather than the current | ||
| 326 | ;; default branch, but nothing in the entire rest of VC exercised | ||
| 327 | ;; this code. Removing it simplifies the backend interface for all | ||
| 328 | ;; modes. | ||
| 329 | ;; | ||
| 330 | ;; Here's the setup code preserved in amber, in case the logic needs | ||
| 331 | ;; to be broken out into a method someday; (if rev (concat "-r" rev)) | ||
| 332 | ;; used to be part of the switches passed to vc-cvs-command. | ||
| 333 | ;; | ||
| 334 | ;; (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) | ||
| 335 | ;; (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) | ||
| 336 | ;; (error "%s is not a valid symbolic tag name" rev) | ||
| 337 | ;; ;; If the input revision is a valid symbolic tag name, we create it | ||
| 338 | ;; ;; as a branch, commit and switch to it. | ||
| 339 | ;; (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) | ||
| 340 | ;; (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) | ||
| 341 | ;; (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) | ||
| 342 | ;; files))) | ||
| 343 | ;; | ||
| 344 | ;; The following postamble cleaned up after the branch change: | ||
| 345 | ;; | ||
| 346 | ;; ;; if this was an explicit check-in (does not include creation of | ||
| 347 | ;; ;; a branch), remove the sticky tag. | ||
| 348 | ;; (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) | ||
| 349 | ;; (vc-cvs-command nil 0 files "update" "-A")))) | ||
| 350 | ;; files))) | ||
| 351 | ;; | ||
| 352 | (defun vc-cvs-checkin (files comment) | ||
| 325 | "CVS-specific version of `vc-backend-checkin'." | 353 | "CVS-specific version of `vc-backend-checkin'." |
| 326 | (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) | ||
| 327 | (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) | ||
| 328 | (error "%s is not a valid symbolic tag name" rev) | ||
| 329 | ;; If the input revision is a valid symbolic tag name, we create it | ||
| 330 | ;; as a branch, commit and switch to it. | ||
| 331 | (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) | ||
| 332 | (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) | ||
| 333 | (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) | ||
| 334 | files))) | ||
| 335 | (let ((status (apply 'vc-cvs-command nil 1 files | 354 | (let ((status (apply 'vc-cvs-command nil 1 files |
| 336 | "ci" (if rev (concat "-r" rev)) | 355 | "ci" (concat "-m" comment) |
| 337 | (concat "-m" comment) | ||
| 338 | (vc-switches 'CVS 'checkin)))) | 356 | (vc-switches 'CVS 'checkin)))) |
| 339 | (set-buffer "*vc*") | 357 | (set-buffer "*vc*") |
| 340 | (goto-char (point-min)) | 358 | (goto-char (point-min)) |
| @@ -365,12 +383,7 @@ its parents." | |||
| 365 | ;; tell it from the permissions of the file (see | 383 | ;; tell it from the permissions of the file (see |
| 366 | ;; vc-cvs-checkout-model). | 384 | ;; vc-cvs-checkout-model). |
| 367 | (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil)) | 385 | (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil)) |
| 368 | files) | 386 | files))) |
| 369 | |||
| 370 | ;; if this was an explicit check-in (does not include creation of | ||
| 371 | ;; a branch), remove the sticky tag. | ||
| 372 | (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) | ||
| 373 | (vc-cvs-command nil 0 files "update" "-A")))) | ||
| 374 | 387 | ||
| 375 | (defun vc-cvs-find-revision (file rev buffer) | 388 | (defun vc-cvs-find-revision (file rev buffer) |
| 376 | (apply 'vc-cvs-command | 389 | (apply 'vc-cvs-command |
diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 9b67d74c779..77979d696d3 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el | |||
| @@ -82,10 +82,8 @@ See `vc-checkout-model' for a list of possible values." | |||
| 82 | ;; Do we need to do anything here? FIXME? | 82 | ;; Do we need to do anything here? FIXME? |
| 83 | ) | 83 | ) |
| 84 | 84 | ||
| 85 | (defun vc-dav-checkin (url rev comment) | 85 | (defun vc-dav-checkin (url comment) |
| 86 | "Commit changes in URL to WebDAV. | 86 | "Commit changes in URL to WebDAV. COMMENT is used as a check-in comment." |
| 87 | If REV is non-nil, that should become the new revision number. | ||
| 88 | COMMENT is used as a check-in comment." | ||
| 89 | ;; This should PUT the resource and release any locks that we hold. | 87 | ;; This should PUT the resource and release any locks that we hold. |
| 90 | ) | 88 | ) |
| 91 | 89 | ||
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 3b11a3cd635..3e45eabee0e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -665,7 +665,7 @@ If toggling on, also insert its message into the buffer." | |||
| 665 | "Major mode for editing Git log messages. | 665 | "Major mode for editing Git log messages. |
| 666 | It is based on `log-edit-mode', and has Git-specific extensions.") | 666 | It is based on `log-edit-mode', and has Git-specific extensions.") |
| 667 | 667 | ||
| 668 | (defun vc-git-checkin (files _rev comment) | 668 | (defun vc-git-checkin (files comment) |
| 669 | (let* ((file1 (or (car files) default-directory)) | 669 | (let* ((file1 (or (car files) default-directory)) |
| 670 | (root (vc-git-root file1)) | 670 | (root (vc-git-root file1)) |
| 671 | (default-directory (expand-file-name root)) | 671 | (default-directory (expand-file-name root)) |
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 4f13914aa2d..583fa6c6909 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -407,7 +407,7 @@ Optional arg REVISION is a revision to annotate from." | |||
| 407 | (and (vc-hg-command nil 0 nil "status") | 407 | (and (vc-hg-command nil 0 nil "status") |
| 408 | (vc-hg-command nil 0 nil (if branchp "bookmark" "tag") name)))) | 408 | (vc-hg-command nil 0 nil (if branchp "bookmark" "tag") name)))) |
| 409 | 409 | ||
| 410 | (defun vc-hg-retrieve-tag (dir name update) | 410 | (defun vc-hg-retrieve-tag (dir name _update) |
| 411 | "Retrieve the version tagged by NAME of all registered files at or below DIR." | 411 | "Retrieve the version tagged by NAME of all registered files at or below DIR." |
| 412 | (let ((default-directory dir)) | 412 | (let ((default-directory dir)) |
| 413 | (vc-hg-command nil 0 nil "update" name) | 413 | (vc-hg-command nil 0 nil "update" name) |
| @@ -477,7 +477,7 @@ COMMENT is ignored." | |||
| 477 | 477 | ||
| 478 | (declare-function log-edit-extract-headers "log-edit" (headers string)) | 478 | (declare-function log-edit-extract-headers "log-edit" (headers string)) |
| 479 | 479 | ||
| 480 | (defun vc-hg-checkin (files _rev comment) | 480 | (defun vc-hg-checkin (files comment) |
| 481 | "Hg-specific version of `vc-backend-checkin'. | 481 | "Hg-specific version of `vc-backend-checkin'. |
| 482 | REV is ignored." | 482 | REV is ignored." |
| 483 | (apply 'vc-hg-command nil 0 files | 483 | (apply 'vc-hg-command nil 0 files |
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index ea071c8586a..fdaca546afd 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el | |||
| @@ -187,7 +187,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." | |||
| 187 | 187 | ||
| 188 | (declare-function log-edit-extract-headers "log-edit" (headers string)) | 188 | (declare-function log-edit-extract-headers "log-edit" (headers string)) |
| 189 | 189 | ||
| 190 | (defun vc-mtn-checkin (files _rev comment) | 190 | (defun vc-mtn-checkin (files comment) |
| 191 | (apply 'vc-mtn-command nil 0 files | 191 | (apply 'vc-mtn-command nil 0 files |
| 192 | (nconc (list "commit" "-m") | 192 | (nconc (list "commit" "-m") |
| 193 | (log-edit-extract-headers '(("Author" . "--author") | 193 | (log-edit-extract-headers '(("Author" . "--author") |
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 57515d04dc7..4b06b0923ba 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el | |||
| @@ -358,23 +358,27 @@ whether to remove it." | |||
| 358 | (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) | 358 | (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) |
| 359 | (delete-directory dir)))) | 359 | (delete-directory dir)))) |
| 360 | 360 | ||
| 361 | (defun vc-rcs-checkin (files rev comment) | 361 | ;; It used to be possible to pass in a value for the variable rev, but |
| 362 | ;; nothing in the rest of VC used this capability. Removing it makes the | ||
| 363 | ;; backend interface simpler for all modes. | ||
| 364 | ;; | ||
| 365 | (defun vc-rcs-checkin (files comment) | ||
| 362 | "RCS-specific version of `vc-backend-checkin'." | 366 | "RCS-specific version of `vc-backend-checkin'." |
| 363 | (let ((switches (vc-switches 'RCS 'checkin))) | 367 | (let (rev (switches (vc-switches 'RCS 'checkin))) |
| 364 | ;; Now operate on the files | 368 | ;; Now operate on the files |
| 365 | (dolist (file (vc-expand-dirs files)) | 369 | (dolist (file (vc-expand-dirs files)) |
| 366 | (let ((old-version (vc-working-revision file)) new-version | 370 | (let ((old-version (vc-working-revision file)) new-version |
| 367 | (default-branch (vc-file-getprop file 'vc-rcs-default-branch))) | 371 | (default-branch (vc-file-getprop file 'vc-rcs-default-branch))) |
| 368 | ;; Force branch creation if an appropriate | 372 | ;; Force branch creation if an appropriate |
| 369 | ;; default branch has been set. | 373 | ;; default branch has been set. |
| 370 | (and (not rev) | 374 | (and default-branch |
| 371 | default-branch | ||
| 372 | (string-match (concat "^" (regexp-quote old-version) "\\.") | 375 | (string-match (concat "^" (regexp-quote old-version) "\\.") |
| 373 | default-branch) | 376 | default-branch) |
| 374 | (setq rev default-branch) | 377 | (setq rev default-branch) |
| 375 | (setq switches (cons "-f" switches))) | 378 | (setq switches (cons "-f" switches))) |
| 376 | (if (and (not rev) old-version) | 379 | (if old-version |
| 377 | (setq rev (vc-branch-part old-version))) | 380 | (setq rev (vc-branch-part old-version)) |
| 381 | (error "can't find current branch")) | ||
| 378 | (apply #'vc-do-command "*vc*" 0 "ci" (vc-name file) | 382 | (apply #'vc-do-command "*vc*" 0 "ci" (vc-name file) |
| 379 | ;; if available, use the secure check-in option | 383 | ;; if available, use the secure check-in option |
| 380 | (and (vc-rcs-release-p "5.6.4") "-j") | 384 | (and (vc-rcs-release-p "5.6.4") "-j") |
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index fb7d9596822..db777ab11e4 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el | |||
| @@ -253,11 +253,10 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." | |||
| 253 | (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "") | 253 | (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "") |
| 254 | (file-name-nondirectory file))))) | 254 | (file-name-nondirectory file))))) |
| 255 | 255 | ||
| 256 | (defun vc-sccs-checkin (files rev comment) | 256 | (defun vc-sccs-checkin (files comment) |
| 257 | "SCCS-specific version of `vc-backend-checkin'." | 257 | "SCCS-specific version of `vc-backend-checkin'." |
| 258 | (dolist (file (vc-expand-dirs files)) | 258 | (dolist (file (vc-expand-dirs files)) |
| 259 | (apply 'vc-sccs-do-command nil 0 "delta" (vc-name file) | 259 | (apply 'vc-sccs-do-command nil 0 "delta" (vc-name file) |
| 260 | (if rev (concat "-r" rev)) | ||
| 261 | (concat "-y" comment) | 260 | (concat "-y" comment) |
| 262 | (vc-switches 'SCCS 'checkin)) | 261 | (vc-switches 'SCCS 'checkin)) |
| 263 | (if vc-keep-workfiles | 262 | (if vc-keep-workfiles |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index c7568e456f5..bd22fbf6a16 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -316,9 +316,8 @@ to the SVN command." | |||
| 316 | "Return non-nil if FILE could be registered in SVN. | 316 | "Return non-nil if FILE could be registered in SVN. |
| 317 | This is only possible if SVN is responsible for FILE's directory.") | 317 | This is only possible if SVN is responsible for FILE's directory.") |
| 318 | 318 | ||
| 319 | (defun vc-svn-checkin (files rev comment &optional _extra-args-ignored) | 319 | (defun vc-svn-checkin (files comment &optional _extra-args-ignored) |
| 320 | "SVN-specific version of `vc-backend-checkin'." | 320 | "SVN-specific version of `vc-backend-checkin'." |
| 321 | (if rev (error "Committing to a specific revision is unsupported in SVN")) | ||
| 322 | (let ((status (apply | 321 | (let ((status (apply |
| 323 | 'vc-svn-command nil 1 files "ci" | 322 | 'vc-svn-command nil 1 files "ci" |
| 324 | (nconc (list "-m" comment) (vc-switches 'SVN 'checkin))))) | 323 | (nconc (list "-m" comment) (vc-switches 'SVN 'checkin))))) |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 083849101d2..2efa4503a3a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -72,7 +72,7 @@ | |||
| 72 | ;; When using Subversion or a later system, anything you do outside VC | 72 | ;; When using Subversion or a later system, anything you do outside VC |
| 73 | ;; *through the VCS tools* should safely interlock with VC | 73 | ;; *through the VCS tools* should safely interlock with VC |
| 74 | ;; operations. Under these VC does little state caching, because local | 74 | ;; operations. Under these VC does little state caching, because local |
| 75 | ;; operations are assumed to be fast. The dividing line is | 75 | ;; operations are assumed to be fast. |
| 76 | ;; | 76 | ;; |
| 77 | ;; ADDING SUPPORT FOR OTHER BACKENDS | 77 | ;; ADDING SUPPORT FOR OTHER BACKENDS |
| 78 | ;; | 78 | ;; |
| @@ -267,12 +267,12 @@ | |||
| 267 | ;; Unregister FILE from this backend. This is only needed if this | 267 | ;; Unregister FILE from this backend. This is only needed if this |
| 268 | ;; backend may be used as a "more local" backend for temporary editing. | 268 | ;; backend may be used as a "more local" backend for temporary editing. |
| 269 | ;; | 269 | ;; |
| 270 | ;; * checkin (files rev comment) | 270 | ;; * checkin (files comment) |
| 271 | ;; | 271 | ;; |
| 272 | ;; Commit changes in FILES to this backend. REV is a historical artifact | 272 | ;; Commit changes in FILES to this backend. COMMENT is used as a |
| 273 | ;; and should be ignored. COMMENT is used as a check-in comment. | 273 | ;; check-in comment. The implementation should pass the value of |
| 274 | ;; The implementation should pass the value of vc-checkin-switches to | 274 | ;; vc-checkin-switches to the backend command. The revision argument |
| 275 | ;; the backend command. | 275 | ;; of some older VC versions is no longer supported. |
| 276 | ;; | 276 | ;; |
| 277 | ;; * find-revision (file rev buffer) | 277 | ;; * find-revision (file rev buffer) |
| 278 | ;; | 278 | ;; |
| @@ -1498,13 +1498,11 @@ Type \\[vc-next-action] to check in changes.") | |||
| 1498 | ".\n") | 1498 | ".\n") |
| 1499 | (message "Please explain why you stole the lock. Type C-c C-c when done."))) | 1499 | (message "Please explain why you stole the lock. Type C-c C-c when done."))) |
| 1500 | 1500 | ||
| 1501 | (defun vc-checkin (files backend &optional rev comment initial-contents) | 1501 | (defun vc-checkin (files backend &optional comment initial-contents) |
| 1502 | "Check in FILES. | 1502 | "Check in FILES. COMMENT is a comment string; if omitted, a |
| 1503 | The optional argument REV may be a string specifying the new revision | 1503 | buffer is popped up to accept a comment. If INITIAL-CONTENTS is |
| 1504 | level (strongly deprecated). COMMENT is a comment | 1504 | non-nil, then COMMENT is used as the initial contents of the log |
| 1505 | string; if omitted, a buffer is popped up to accept a comment. If | 1505 | entry buffer. |
| 1506 | INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents | ||
| 1507 | of the log entry buffer. | ||
| 1508 | 1506 | ||
| 1509 | If `vc-keep-workfiles' is nil, FILE is deleted afterwards, provided | 1507 | If `vc-keep-workfiles' is nil, FILE is deleted afterwards, provided |
| 1510 | that the version control system supports this mode of operation. | 1508 | that the version control system supports this mode of operation. |
| @@ -1530,7 +1528,7 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." | |||
| 1530 | ;; vc-checkin-switches, but 'the' local buffer is | 1528 | ;; vc-checkin-switches, but 'the' local buffer is |
| 1531 | ;; not a well-defined concept for filesets. | 1529 | ;; not a well-defined concept for filesets. |
| 1532 | (progn | 1530 | (progn |
| 1533 | (vc-call-backend backend 'checkin files rev comment) | 1531 | (vc-call-backend backend 'checkin files comment) |
| 1534 | (mapc 'vc-delete-automatic-version-backups files)) | 1532 | (mapc 'vc-delete-automatic-version-backups files)) |
| 1535 | `((vc-state . up-to-date) | 1533 | `((vc-state . up-to-date) |
| 1536 | (vc-checkout-time . ,(nth 5 (file-attributes file))) | 1534 | (vc-checkout-time . ,(nth 5 (file-attributes file))) |
| @@ -2686,7 +2684,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. | |||
| 2686 | (when (or move edited) | 2684 | (when (or move edited) |
| 2687 | (vc-file-setprop file 'vc-state 'edited) | 2685 | (vc-file-setprop file 'vc-state 'edited) |
| 2688 | (vc-mode-line file new-backend) | 2686 | (vc-mode-line file new-backend) |
| 2689 | (vc-checkin file new-backend nil comment (stringp comment))))) | 2687 | (vc-checkin file new-backend comment (stringp comment))))) |
| 2690 | 2688 | ||
| 2691 | (defun vc-rename-master (oldmaster newfile templates) | 2689 | (defun vc-rename-master (oldmaster newfile templates) |
| 2692 | "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES." | 2690 | "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES." |