all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 20637@debbugs.gnu.org
Subject: bug#20637: incompatible, undocumented change to vc-working-revision
Date: Fri, 15 Apr 2016 03:20:59 +0300	[thread overview]
Message-ID: <9ac1dc55-94f9-2556-d520-96d47e43c4cf@yandex.ru> (raw)
In-Reply-To: <87h9f4ghzg.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

On 04/14/2016 09:31 PM, Michael Albinus wrote:

> I've committed this to emacs-25. Plus commenting the now failing checks
> in vc-tests.el.

Thanks. Any objections to committing this follow-up patch?

It makes the tests look a lot more meaningful, and it passes for all 
backends, AFAICT, but I don't have e.g. Monotone installed.

[-- Attachment #2: vc-tests.diff --]
[-- Type: text/x-patch, Size: 3082 bytes --]

diff --git a/test/automated/vc-tests.el b/test/automated/vc-tests.el
index 5042196..f9c0ce1 100644
--- a/test/automated/vc-tests.el
+++ b/test/automated/vc-tests.el
@@ -205,12 +205,10 @@ vc-test--create-repo
 (defun vc-test--unregister-function (backend file)
   "Run the `vc-unregister' backend function.
 For backends which dont support it, `vc-not-supported' is signalled."
-
-  (let ((symbol (intern (downcase (format "vc-%s-unregister" backend)))))
-    (if (functionp symbol)
-	(funcall symbol file)
-      ;; CVS, SVN, SCCS, SRC and Mtn are not supported.
-      (signal 'vc-not-supported (list 'unregister backend)))))
+  ;; CVS, SVN, SCCS, SRC and Mtn are not supported, and will signal
+  ;; `vc-not-supported'.
+  (vc-call-backend backend 'unregister file)
+  (vc-file-clearprops file))
 
 (defun vc-test--register (backend)
   "Register and unregister a file."
@@ -289,6 +287,9 @@ vc-test--state
           ;; added: Git
           ;; unregistered: CVS SCCS SRC
 	  ;; up-to-date: Bzr SVN
+          ;; FIXME: Delete this check.  A directory does not have a
+          ;; state, only files inside of it have states, and there is no way
+          ;; to combine those states into a single value unambiguously.
           (message "vc-state1 %s" (vc-state default-directory))
 	  ;;(should (eq (vc-state default-directory)
 		      ;;(vc-state default-directory backend)))
@@ -305,7 +306,7 @@ vc-test--state
             (message "vc-state2 %s" (vc-state tmp-name))
 	    ;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
 	    (should (memq (vc-state tmp-name)
-			  '(nil added unregistered up-to-date)))
+			  '(nil)))
 
 	    ;; Write a new file.  Check state.
 	    (write-region "foo" nil tmp-name nil 'nomessage)
@@ -317,19 +318,19 @@ vc-test--state
             (message "vc-state3 %s" (vc-state tmp-name))
 	    ;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
 	    (should (memq (vc-state tmp-name)
-			  '(nil added unregistered up-to-date)))
+			  '(nil)))
 
 	    ;; Register a file.  Check state.
 	    (vc-register
-	     (list backend (list (file-name-nondirectory tmp-name))))
+	     (list backend (list tmp-name)))
 
             ;; added: Git Mtn
             ;; 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 (eq (vc-state tmp-name) (vc-state tmp-name backend)))
 	    (should (memq (vc-state tmp-name)
-                          '(nil added unregistered up-to-date)))
+                          '(added up-to-date)))
 
 	    ;; Unregister the file.  Check state.
 	    (condition-case nil
@@ -343,7 +344,7 @@ vc-test--state
                   (message "vc-state5 %s" (vc-state tmp-name))
 		  ;;(should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
 		  (should (memq (vc-state tmp-name)
-				'(nil added unregistered up-to-date))))
+				'(nil unregistered))))
 	      (vc-not-supported (message "vc-state5 unsupported")))))
 
       ;; Save exit.

  reply	other threads:[~2016-04-15  0:20 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23 23:49 bug#20637: incompatible, undocumented change to vc-working-revision Glenn Morris
2016-03-28 23:28 ` Dmitry Gutov
2016-03-29 18:13   ` Michael Albinus
2016-04-01  0:36     ` Dmitry Gutov
2016-04-09 19:34       ` Michael Albinus
2016-04-09 20:42         ` Dmitry Gutov
2016-04-10  8:00           ` Michael Albinus
2016-04-10 16:00             ` Dmitry Gutov
2016-04-10 18:09               ` Michael Albinus
2016-04-10 18:58                 ` Dmitry Gutov
2016-04-11  6:55                   ` Michael Albinus
2016-04-13 20:55                     ` Dmitry Gutov
2016-04-14  7:10                       ` Michael Albinus
2016-04-14 13:53                         ` Dmitry Gutov
2016-04-14 15:26                           ` Michael Albinus
2016-04-15  0:33                             ` Dmitry Gutov
2016-04-15 13:13                               ` Michael Albinus
2016-04-14 15:23                         ` Eli Zaretskii
2016-04-13 15:14   ` Michael Albinus
2016-04-13 20:49     ` Dmitry Gutov
2016-04-14  7:21       ` Michael Albinus
2016-04-14 14:20         ` Dmitry Gutov
2016-04-14 18:31           ` Michael Albinus
2016-04-15  0:20             ` Dmitry Gutov [this message]
2016-04-15 13:11               ` Michael Albinus
2016-04-17  0:44                 ` Dmitry Gutov
2016-04-18 12:27                   ` Michael Albinus
2016-04-18 12:33                     ` Dmitry Gutov
2016-04-18 12:46                       ` Michael Albinus
2016-04-18  1:40                 ` Dmitry Gutov
2016-04-15  1:01             ` Dmitry Gutov
2016-04-15  1:04               ` Dmitry Gutov
2016-04-15 13:23               ` Michael Albinus
2016-04-17  0:17                 ` Docstrings and manuals, was: " Dmitry Gutov
2016-04-17  8:49                   ` Docstrings and manuals Michael Albinus
2016-04-17 10:50                     ` Dmitry Gutov
2016-04-17 11:16                       ` Michael Albinus
2016-04-17 11:42                         ` Dmitry Gutov
2016-04-17 12:19                           ` Michael Albinus
2016-04-17 13:12                             ` Dmitry Gutov
2016-04-17 15:14                               ` Eli Zaretskii
2016-04-17 16:39                               ` Michael Albinus
2016-04-17 19:39                                 ` Dmitry Gutov
2016-04-17 15:12                           ` Eli Zaretskii
2016-04-17 19:59                             ` Dmitry Gutov
2016-04-18  2:30                               ` Eli Zaretskii
2016-04-18 12:55                             ` Phillip Lord
2016-04-18 15:35                               ` Marcin Borkowski
2016-04-18 15:47                               ` Stefan Monnier
2016-04-18 16:30                                 ` Marcin Borkowski
2016-04-18 18:56                                 ` Eli Zaretskii
2016-04-18 19:33                                   ` Stefan Monnier
2016-04-18 19:39                                     ` Eli Zaretskii
     [not found]                           ` <<83ziss9sml.fsf@gnu.org>
2016-04-17 15:54                             ` Drew Adams
2016-04-17 15:03                       ` Eli Zaretskii
2016-04-17 15:15                         ` Dmitry Gutov
2016-04-17 16:23                           ` Eli Zaretskii
2016-04-17 20:22                             ` Dmitry Gutov
2016-04-18  2:33                               ` Eli Zaretskii
2016-04-18  8:38                           ` Richard Stallman
2016-04-18  9:50                             ` Dmitry Gutov
2016-04-19  0:25                               ` Richard Stallman
2016-04-19  7:59                                 ` Dmitry Gutov
2016-04-19 23:51                                   ` Richard Stallman
2016-04-17  0:27                 ` bug#20637: incompatible, undocumented change to vc-working-revision Dmitry Gutov
2016-04-18  1:33             ` Dmitry Gutov
2016-04-18 12:28               ` Michael Albinus
2016-04-18 12:37                 ` Dmitry Gutov
2016-04-18 12:53                   ` Michael Albinus
2016-04-18 12:58                     ` Dmitry Gutov
2016-04-18 13:06                       ` Michael Albinus
2016-04-18 16:34                     ` John Wiegley
2016-04-18 14:55           ` vc-state and unregistered (was: bug#20637: incompatible, undocumented change to vc-working-revision) Michael Albinus
2016-04-18 21:11             ` vc-state and unregistered Dmitry Gutov
2016-04-19  8:10               ` Michael Albinus
2016-04-19  8:21                 ` Dmitry Gutov
2016-04-19  8:31                   ` Michael Albinus
2016-04-19  8:43                     ` Dmitry Gutov
2016-04-24 12:11                       ` Michael Albinus
2016-04-24 12:21                         ` Dmitry Gutov
2016-04-24 12:45                           ` Michael Albinus
2016-04-24 12:49                             ` Dmitry Gutov
2016-04-24 13:07                               ` Michael Albinus
2016-04-24 13:13                                 ` Dmitry Gutov
2016-04-24 13:24                                   ` Michael Albinus
2016-04-24 13:27                                     ` Dmitry Gutov
2016-04-24 14:03                                       ` Michael Albinus
2016-04-24 17:23                                         ` Dmitry Gutov
2016-04-24 17:35                                 ` Dmitry Gutov
2016-04-24 18:13                                   ` Michael Albinus
2016-04-24 18:58                                     ` Dmitry Gutov
2016-04-24 19:41                                       ` Michael Albinus
2016-04-24 20:43                                         ` Dmitry Gutov
2016-04-24 13:08                               ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ac1dc55-94f9-2556-d520-96d47e43c4cf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=20637@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.