]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove could-register from the set of public VC backend methods,
authorEric S. Raymond <esr@thyrsus.com>
Mon, 1 Dec 2014 23:54:28 +0000 (18:54 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 1 Dec 2014 23:54:28 +0000 (18:54 -0500)
* vc/vc.el and all backends: API simplification; could-register
is no longer a public method.  (vc-cvs.el still has a private
implementation.)

lisp/ChangeLog
lisp/vc/vc-bzr.el
lisp/vc/vc-dav.el
lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-mtn.el
lisp/vc/vc-src.el
lisp/vc/vc-svn.el
lisp/vc/vc.el

index 76590e12866a4e1cad10d3a897cd3560e17a3ae9..6c2b33ea56662055a87505bafc6027c3e6fa460d 100644 (file)
@@ -1,10 +1,14 @@
 2014-12-01  Eric S. Raymond  <esr@snark.thyrsus.com>
 
-       * vc/vc.el, and all backends: API cleanup; the backend diff method
+       * vc/vc.el and all backends: API simplification; could-register
+       is no longer a public method.  (vc-cvs.el still has a private
+       implementation.)
+
+       * vc/vc.el and all backends: API cleanup; the backend diff method
        takes an explicit async flag.  This eliminates a particularly ugly
        global.
 
-       vc-bzr.el: Restore vc-bzr-state-heuristic as a private method.
+       vc-bzr.el: Restore vc-bzr-state-heuristic as a private method.
        VC randomly/unpredictable fails without it; cause not yet established.
 
 2014-12-01  Stefan Monnier  <monnier@iro.umontreal.ca>
index 48476dc96543a6f8269059e40e5c2c0eb2da2b29..de6ae21dbfe0d60b0fc579d5a50f6734994689a5 100644 (file)
@@ -596,18 +596,6 @@ in the branch repository (or whose status not be determined)."
 The criterion is that there is a `.bzr' directory in the same
 or a superior directory.")
 
-(defun vc-bzr-could-register (file)
-  "Return non-nil if FILE could be registered under bzr."
-  (and (vc-bzr-responsible-p file)      ; shortcut
-       (condition-case ()
-           (with-temp-buffer
-             (vc-bzr-command "add" t 0 file "--dry-run")
-             ;; The command succeeds with no output if file is
-             ;; registered (in bzr 0.8).
-             (goto-char (point-min))
-             (looking-at "added "))
-         (error))))
-
 (defun vc-bzr-unregister (file)
   "Unregister FILE from bzr."
   (vc-bzr-command "remove" nil 0 file "--keep"))
index 46aa027c6c5b2c26ae817afcaf946c58f95bf912..4271cf7d1b3b8086baed9169259cc05ba0dc6ac9 100644 (file)
@@ -145,11 +145,6 @@ It should return a status of either 0 (no differences found), or
   ;; Check for DAV support on the web server.
   t)
 
-(defun vc-dav-could-register (url)
-  "Return non-nil if URL could be registered under this backend."
-  ;; Check for DAV support on the web server.
-  t)
-
 ;;; Unimplemented functions
 ;;
 ;; vc-dav-latest-on-branch-p(URL)
index 8fdea8c216bcb1484b08b404308e6ac930a090c0..93a129c1fc4c46948d1c0f332ae07ddb282593a6 100644 (file)
@@ -58,7 +58,6 @@
 ;; * create-repo ()                                OK
 ;; * register (files &optional rev comment)        OK
 ;; - responsible-p (file)                          OK
-;; - could-register (file)                         NOT NEEDED, DEFAULT IS GOOD
 ;; - receive-file (file rev)                       NOT NEEDED
 ;; - unregister (file)                             OK
 ;; * checkin (files rev comment)                   OK
index 0f636c0184816b2a49171f0b1625961f191b2f6a..b5be8d5f04c6ecbbd129b8933f6908ab2899972c 100644 (file)
@@ -55,7 +55,6 @@
 ;; * register (files &optional rev comment)    OK
 ;; * create-repo ()                            OK
 ;; - responsible-p (file)                      OK
-;; - could-register (file)                     OK
 ;; - receive-file (file rev)                   ?? PROBABLY NOT NEEDED
 ;; - unregister (file)                         OK
 ;; * checkin (files rev comment)               OK
@@ -450,17 +449,6 @@ Optional arg REVISION is a revision to annotate from."
 
 (defalias 'vc-hg-responsible-p 'vc-hg-root)
 
-;; Modeled after the similar function in vc-bzr.el
-(defun vc-hg-could-register (file)
-  "Return non-nil if FILE could be registered under hg."
-  (and (vc-hg-responsible-p file)      ; shortcut
-       (condition-case ()
-           (with-temp-buffer
-             (vc-hg-command t nil file "add" "--dry-run"))
-             ;; The command succeeds with no output if file is
-             ;; registered.
-         (error))))
-
 (defun vc-hg-unregister (file)
   "Unregister FILE from hg."
   (vc-hg-command nil 0 file "forget"))
index e03d8551d6e4efeb06aab522b20b9da2c95dc47d..85aaf3dc5428067b76a90002fa46717301537003 100644 (file)
@@ -180,7 +180,6 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
   (vc-mtn-command nil 0 files "add"))
 
 (defun vc-mtn-responsible-p (file) (vc-mtn-root file))
-(defun vc-mtn-could-register (file) (vc-mtn-root file))
 
 (declare-function log-edit-extract-headers "log-edit" (headers string))
 
index 49c799c44e11074ecdcd88fef45ddff2c7711d35..c93ff96fd29112ef5b3a1d912d24709d3ca6fd7f 100644 (file)
@@ -43,7 +43,6 @@
 ;; * register (files &optional rev comment)    OK
 ;; * create-repo ()                            OK
 ;; * responsible-p (file)                      OK
-;; * could-register (file)                     OK
 ;; - receive-file (file rev)                   NOT NEEDED
 ;; - unregister (file)                         NOT NEEDED
 ;; * checkin (files comment)                   OK
@@ -232,8 +231,6 @@ This function differs from vc-do-command in that it invokes `vc-src-program'."
                                           file
                                         (file-name-directory file)))))
 
-(defalias 'vc-could-register 'vc-src-responsible-p)
-
 (defun vc-src-checkin (files comment)
   "SRC-specific version of `vc-backend-checkin'.
 REV is ignored."
index 54b998df9d5b7d969f6bcda5b1dd67187d0d5794..55b8f111e0155f4ae95e5301606e35e938f09de6 100644 (file)
@@ -284,10 +284,6 @@ to the SVN command."
 
 (defalias 'vc-svn-responsible-p 'vc-svn-root)
 
-(defalias 'vc-svn-could-register 'vc-svn-root
-  "Return non-nil if FILE could be registered in SVN.
-This is only possible if SVN is responsible for FILE's directory.")
-
 (defun vc-svn-checkin (files comment &optional _extra-args-ignored)
   "SVN-specific version of `vc-backend-checkin'."
   (let ((status (apply
index 121e32925dad726fe93eb559b41f4dd60fa14113..40e4211c6e41b8a0297d8110e31a093533375c06 100644 (file)
 ;;   like change log generation.  The default implementation always
 ;;   returns nil.
 ;;
-;; - could-register (file)
-;;
-;;   Return non-nil if FILE could be registered under this backend.  The
-;;   default implementation always returns t.
-;;
 ;; - receive-file (file rev)
 ;;
 ;;   Let this backend "receive" a file that is already registered under
 ;;   call to it.  A few older back ends retain versions for internal use in
 ;;   their vc-state functions.
 ;;
+;;   could-register is no longer a public method.  Only vc-cvs ever used it
 
 ;;; Todo:
 
@@ -2824,11 +2820,6 @@ log entries should be gathered."
 The default is to return nil always."
   nil)
 
-(defun vc-default-could-register (_backend _file)
-  "Return non-nil if BACKEND could be used to register FILE.
-The default implementation returns t for all files."
-  t)
-
 (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