diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-11-20 02:37:06 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-11-20 02:37:06 -0500 |
commit | f83109f0fabe13c0175ca6fe23b475bd8a9d9d99 (patch) | |
tree | 8cccade7f4f1b9226dd3e2a09a3c5c73d6b704ed /lisp/vc/vc-cvs.el | |
parent | f5d77aafa9d59c4afb13d744e67a0e4daf3be31a (diff) | |
download | emacs-f83109f0fabe13c0175ca6fe23b475bd8a9d9d99.tar.gz emacs-f83109f0fabe13c0175ca6fe23b475bd8a9d9d99.tar.bz2 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...
Diffstat (limited to 'lisp/vc/vc-cvs.el')
-rw-r--r-- | lisp/vc/vc-cvs.el | 49 |
1 files changed, 31 insertions, 18 deletions
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." (directory-file-name dir)))) (eq dir t))) -(defun vc-cvs-checkin (files rev comment) +;; vc-cvs-checkin used to take a 'rev' second argument that allowed +;; checking in onto a specified branch tip rather than the current +;; default branch, but nothing in the entire rest of VC exercised +;; this code. Removing it simplifies the backend interface for all +;; modes. +;; +;; Here's the setup code preserved in amber, in case the logic needs +;; to be broken out into a method someday; (if rev (concat "-r" rev)) +;; used to be part of the switches passed to vc-cvs-command. +;; +;; (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) +;; (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) +;; (error "%s is not a valid symbolic tag name" rev) +;; ;; If the input revision is a valid symbolic tag name, we create it +;; ;; as a branch, commit and switch to it. +;; (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) +;; (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) +;; (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) +;; files))) +;; +;; The following postamble cleaned up after the branch change: +;; +;; ;; if this was an explicit check-in (does not include creation of +;; ;; a branch), remove the sticky tag. +;; (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) +;; (vc-cvs-command nil 0 files "update" "-A")))) +;; files))) +;; +(defun vc-cvs-checkin (files comment) "CVS-specific version of `vc-backend-checkin'." - (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) - (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) - (error "%s is not a valid symbolic tag name" rev) - ;; If the input revision is a valid symbolic tag name, we create it - ;; as a branch, commit and switch to it. - (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) - (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) - (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) - files))) (let ((status (apply 'vc-cvs-command nil 1 files - "ci" (if rev (concat "-r" rev)) - (concat "-m" comment) + "ci" (concat "-m" comment) (vc-switches 'CVS 'checkin)))) (set-buffer "*vc*") (goto-char (point-min)) @@ -365,12 +383,7 @@ its parents." ;; tell it from the permissions of the file (see ;; vc-cvs-checkout-model). (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil)) - files) - - ;; if this was an explicit check-in (does not include creation of - ;; a branch), remove the sticky tag. - (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) - (vc-cvs-command nil 0 files "update" "-A")))) + files))) (defun vc-cvs-find-revision (file rev buffer) (apply 'vc-cvs-command |