Fix Bug#20637. Do not merge to master
* lisp/vc/vc-hooks.el (vc-state, vc-working-revision): Use `vc-backend' instead of `vc-responsible-backend'. (Bug#20637) * test/automated/vc-tests.el (vc-test--state) (vc-test--working-revision): Deactivate now failing checks.
This commit is contained in:
parent
32364bbbaa
commit
1b98a68b66
2 changed files with 21 additions and 20 deletions
|
@ -476,7 +476,7 @@ status of this file. Otherwise, the value returned is one of:
|
|||
;; - `copied' and `moved' (might be handled by `removed' and `added')
|
||||
(or (vc-file-getprop file 'vc-state)
|
||||
(when (> (length file) 0) ;Why?? --Stef
|
||||
(setq backend (or backend (vc-responsible-backend file)))
|
||||
(setq backend (or backend (vc-backend file)))
|
||||
(when backend
|
||||
(vc-state-refresh file backend)))))
|
||||
|
||||
|
@ -495,7 +495,7 @@ status of this file. Otherwise, the value returned is one of:
|
|||
If FILE is not registered, this function always returns nil."
|
||||
(or (vc-file-getprop file 'vc-working-revision)
|
||||
(progn
|
||||
(setq backend (or backend (vc-responsible-backend file)))
|
||||
(setq backend (or backend (vc-backend file)))
|
||||
(when backend
|
||||
(vc-file-setprop file 'vc-working-revision
|
||||
(vc-call-backend backend 'working-revision file))))))
|
||||
|
|
|
@ -290,8 +290,8 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; unregistered: CVS SCCS SRC
|
||||
;; up-to-date: Bzr SVN
|
||||
(message "vc-state1 %s" (vc-state default-directory))
|
||||
(should (eq (vc-state default-directory)
|
||||
(vc-state default-directory backend)))
|
||||
;;(should (eq (vc-state default-directory)
|
||||
;;(vc-state default-directory backend)))
|
||||
(should (memq (vc-state default-directory)
|
||||
'(nil added unregistered up-to-date)))
|
||||
|
||||
|
@ -303,7 +303,7 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; unregistered: RCS SCCS
|
||||
;; up-to-date: Bzr CVS
|
||||
(message "vc-state2 %s" (vc-state tmp-name))
|
||||
(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
(should (memq (vc-state tmp-name)
|
||||
'(nil added unregistered up-to-date)))
|
||||
|
||||
|
@ -315,7 +315,7 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; unregistered: Hg RCS SCCS SRC SVN
|
||||
;; up-to-date: Bzr CVS
|
||||
(message "vc-state3 %s" (vc-state tmp-name))
|
||||
(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
(should (memq (vc-state tmp-name)
|
||||
'(nil added unregistered up-to-date)))
|
||||
|
||||
|
@ -327,8 +327,9 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; unregistered: Hg RCS SCCS SRC SVN
|
||||
;; up-to-date: Bzr CVS
|
||||
(message "vc-state4 %s" (vc-state tmp-name))
|
||||
(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
(should (memq (vc-state tmp-name) '(added unregistered up-to-date)))
|
||||
;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
(should (memq (vc-state tmp-name)
|
||||
'(nil added unregistered up-to-date)))
|
||||
|
||||
;; Unregister the file. Check state.
|
||||
(condition-case nil
|
||||
|
@ -340,9 +341,9 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; unsupported: CVS Mtn SCCS SRC SVN
|
||||
;; up-to-date: Bzr
|
||||
(message "vc-state5 %s" (vc-state tmp-name))
|
||||
(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
|
||||
(should (memq (vc-state tmp-name)
|
||||
'(added unregistered up-to-date))))
|
||||
'(nil added unregistered up-to-date))))
|
||||
(vc-not-supported (message "vc-state5 unsupported")))))
|
||||
|
||||
;; Save exit.
|
||||
|
@ -374,8 +375,8 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; "0": Bzr Hg SRC SVN
|
||||
(message
|
||||
"vc-working-revision1 %s" (vc-working-revision default-directory))
|
||||
(should (eq (vc-working-revision default-directory)
|
||||
(vc-working-revision default-directory backend)))
|
||||
;;(should (eq (vc-working-revision default-directory)
|
||||
;;(vc-working-revision default-directory backend)))
|
||||
(should (member (vc-working-revision default-directory) '(nil "0")))
|
||||
|
||||
(let ((tmp-name (expand-file-name "foo" default-directory)))
|
||||
|
@ -385,8 +386,8 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; nil: CVS Git Mtn RCS SCCS SVN
|
||||
;; "0": Bzr Hg SRC
|
||||
(message "vc-working-revision2 %s" (vc-working-revision tmp-name))
|
||||
(should (eq (vc-working-revision tmp-name)
|
||||
(vc-working-revision tmp-name backend)))
|
||||
;;(should (eq (vc-working-revision tmp-name)
|
||||
;;(vc-working-revision tmp-name backend)))
|
||||
(should (member (vc-working-revision tmp-name) '(nil "0")))
|
||||
|
||||
;; Write a new file. Check working revision.
|
||||
|
@ -395,8 +396,8 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; nil: CVS Git Mtn RCS SCCS SVN
|
||||
;; "0": Bzr Hg SRC
|
||||
(message "vc-working-revision3 %s" (vc-working-revision tmp-name))
|
||||
(should (eq (vc-working-revision tmp-name)
|
||||
(vc-working-revision tmp-name backend)))
|
||||
;;(should (eq (vc-working-revision tmp-name)
|
||||
;;(vc-working-revision tmp-name backend)))
|
||||
(should (member (vc-working-revision tmp-name) '(nil "0")))
|
||||
|
||||
;; Register a file. Check working revision.
|
||||
|
@ -406,8 +407,8 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; nil: Mtn Git RCS SCCS
|
||||
;; "0": Bzr CVS Hg SRC SVN
|
||||
(message "vc-working-revision4 %s" (vc-working-revision tmp-name))
|
||||
(should (eq (vc-working-revision tmp-name)
|
||||
(vc-working-revision tmp-name backend)))
|
||||
;;(should (eq (vc-working-revision tmp-name)
|
||||
;;(vc-working-revision tmp-name backend)))
|
||||
(should (member (vc-working-revision tmp-name) '(nil "0")))
|
||||
|
||||
;; Unregister the file. Check working revision.
|
||||
|
@ -420,8 +421,8 @@ For backends which dont support it, `vc-not-supported' is signalled."
|
|||
;; unsupported: CVS Mtn SCCS SRC SVN
|
||||
(message
|
||||
"vc-working-revision5 %s" (vc-working-revision tmp-name))
|
||||
(should (eq (vc-working-revision tmp-name)
|
||||
(vc-working-revision tmp-name backend)))
|
||||
;;(should (eq (vc-working-revision tmp-name)
|
||||
;;(vc-working-revision tmp-name backend)))
|
||||
(should (member (vc-working-revision tmp-name) '(nil "0"))))
|
||||
(vc-not-supported (message "vc-working-revision5 unsupported")))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue