From: Eric S. Raymond Date: Fri, 12 Dec 2014 04:29:41 +0000 (-0500) Subject: latest-on-branch-p is no longer a public method X-Git-Tag: emacs-25.0.90~2635^2~108 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be6dff68be9ad15245896b0b7868369c6e3716ac;p=emacs.git latest-on-branch-p is no longer a public method * vc/vc-dav.el, vc/vc-git.el, vc/vc-hg.el, vc/vc-src.el, vc/vc.el: latest-on-branch-p is no longer a public method. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5916f2996e3..75effaa865d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-12-12 Eric S. Raymond + * vc/vc-dav.el, vc/vc-git.el, vc/vc-hg.el, vc/vc-src.el, + vc/vc.el: latest-on-branch-p is no longer a public method. + * vc/vc.el, vc/vc-hg.el, vc/vc-git.el, vc/vc-hooks.el, vc/vc-mtn.el, vc/vc-rcs.el, vc/vc-sccs.el, vc/vc-src.el: rrollback method removed, to be replaced in the future by uncommit. diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 4271cf7d1b3..4c3fe6abff7 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -147,10 +147,6 @@ It should return a status of either 0 (no differences found), or ;;; Unimplemented functions ;; -;; vc-dav-latest-on-branch-p(URL) -;; Return non-nil if the current workfile version of FILE is the -;; latest on its branch. There are no branches in webdav yet. -;; ;; vc-dav-mode-line-string(url) ;; Return a dav-specific mode line string for URL. Are there any ;; specific states that we want exposed? diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b5e92bb50ac..c41dde1b3db 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -52,7 +52,6 @@ ;; * state (file) OK ;; - dir-status-files (dir files uf) OK ;; * working-revision (file) OK -;; - latest-on-branch-p (file) NOT NEEDED ;; * checkout-model (files) OK ;; - mode-line-string (file) OK ;; STATE-CHANGING FUNCTIONS diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 90370839921..0d9f9f182fa 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -47,7 +47,6 @@ ;; - dir-extra-headers (dir) OK ;; - dir-printer (fileinfo) OK ;; * working-revision (file) OK -;; - latest-on-branch-p (file) ?? ;; * checkout-model (files) OK ;; - mode-line-string (file) NOT NEEDED ;; STATE-CHANGING FUNCTIONS diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index 6ba8b8c809f..539437d185c 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -35,7 +35,6 @@ ;; - dir-extra-headers (dir) NOT NEEDED ;; - dir-printer (fileinfo) ?? ;; * working-revision (file) OK -;; - latest-on-branch-p (file) ?? ;; * checkout-model (files) OK ;; - mode-line-string (file) NOT NEEDED ;; STATE-CHANGING FUNCTIONS diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index c6721cb511f..07a3394ad94 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -52,9 +52,9 @@ ;; This mode is fully documented in the Emacs user's manual. ;; -;; Supported version-control systems presently include CVS, RCS, SRC, GNU -;; Arch, Subversion, Bzr, Git, Mercurial, Monotone and SCCS -;; (or its free replacement, CSSC). +;; Supported version-control systems presently include CVS, RCS, SRC, +;; GNU Subversion, Bzr, Git, Mercurial, Monotone and SCCS (or its free +;; replacement, CSSC). ;; ;; If your site uses the ChangeLog convention supported by Emacs, the ;; function `log-edit-comment-to-change-log' could prove a useful checkin hook, @@ -180,13 +180,6 @@ ;; head or tip revision. Should return "0" for a file added but not yet ;; committed. ;; -;; - latest-on-branch-p (file) -;; -;; Return non-nil if the working revision of FILE is the latest revision -;; on its branch (many VCSes call this the 'tip' or 'head' revision). -;; The default implementation always returns t, which means that -;; working with non-current revisions is not supported by default. -;; ;; * checkout-model (files) ;; ;; Indicate whether FILES need to be "checked out" before they can be @@ -604,6 +597,11 @@ ;; ;; - The rollback method (implemented by RCS and SCCS only) is gone. See ;; the to-do note on uncommit. +;; +;; - latest-on-branch-p is no longer a public method. It was to be used +;; for implementing rollback. RCS keeps its implementation (the only one) +;; for internal use. + ;;; Todo: @@ -635,16 +633,6 @@ ;; ;; - Add the ability to list tags and branches. ;; -;;;; Internal cleanups: -;; -;; - Another important thing: merge all the status-like backend -;; operations. We should remove dir-status-files and state and -;; replace them with just `status' which takes a fileset and a -;; continuation (like dir-status-files) and returns a buffer in -;; which the process(es) are run (or nil if it worked -;; synchronously). Hopefully we can define the old operations in -;; term of this one. -;; ;;;; Unify two different versions of the amend capability ;; ;; - Some back ends (SCCS/RCS/SVN/SRC), have an amend capability that can @@ -1462,9 +1450,7 @@ After check-out, runs the normal hook `vc-checkout-hook'." (signal (car err) (cdr err)))) `((vc-state . ,(if (or (eq (vc-checkout-model backend (list file)) 'implicit) nil) - (if (vc-call-backend backend 'latest-on-branch-p file) - 'up-to-date - 'needs-update) + 'up-to-date 'edited)) (vc-checkout-time . ,(nth 5 (file-attributes file)))))) (vc-resynch-buffer file t t) @@ -2737,12 +2723,6 @@ log entries should be gathered." The default is to return nil always." nil) -(defun vc-default-latest-on-branch-p (_backend _file) - "Return non-nil if FILE is the latest on its branch. -This default implementation always returns non-nil, which means that -editing non-current revisions is not supported by default." - t) - (defun vc-default-find-revision (backend file rev buffer) "Provide the new `find-revision' op based on the old `checkout' op. This is only for compatibility with old backends. They should be updated