From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#20637: incompatible, undocumented change to vc-working-revision Date: Fri, 15 Apr 2016 03:20:59 +0300 Message-ID: <9ac1dc55-94f9-2556-d520-96d47e43c4cf@yandex.ru> References: <6ok2vyzwf9.fsf@fencepost.gnu.org> <08f70cda-44be-0657-e50a-2b2c80d2c21c@yandex.ru> <87oa9dzgl0.fsf@gmx.de> <87potshczh.fsf@gmx.de> <87h9f4ghzg.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------225349C907F5DEDBA0E2C219" X-Trace: ger.gmane.org 1460679742 2291 80.91.229.3 (15 Apr 2016 00:22:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Apr 2016 00:22:22 +0000 (UTC) Cc: 20637@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 15 02:22:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aqrWU-00035W-Ly for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Apr 2016 02:22:10 +0200 Original-Received: from localhost ([::1]:49872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqrWT-0000I0-RX for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Apr 2016 20:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqrWP-0000Fm-Q5 for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 20:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqrWM-0003wc-Jg for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 20:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqrWM-0003wY-G8 for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 20:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aqrWM-0006DJ-Co for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2016 20:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Apr 2016 00:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20637 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20637-submit@debbugs.gnu.org id=B20637.146067967023822 (code B ref 20637); Fri, 15 Apr 2016 00:22:02 +0000 Original-Received: (at 20637) by debbugs.gnu.org; 15 Apr 2016 00:21:10 +0000 Original-Received: from localhost ([127.0.0.1]:35809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqrVV-0006CA-P8 for submit@debbugs.gnu.org; Thu, 14 Apr 2016 20:21:09 -0400 Original-Received: from mail-wm0-f66.google.com ([74.125.82.66]:35814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqrVT-0006BX-C0 for 20637@debbugs.gnu.org; Thu, 14 Apr 2016 20:21:07 -0400 Original-Received: by mail-wm0-f66.google.com with SMTP id a140so1950334wma.2 for <20637@debbugs.gnu.org>; Thu, 14 Apr 2016 17:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=6h1BO+Ublm+bqDmO4u6xgTXYIXGvXDJxH2/Ewy5NlCI=; b=IB7Btu/NOrAzJrmBNSB3M2LdY4UyG9jq6U0KsHXwiZRQEOJPwE0nMb0FTEEzrZbqZ+ uvGIX0hpISMU1DkSJS/18tK6g2D7kQ46ZK2XUHO0Lr/5gIM4/IkIPBeHcLVqrPUUvTRj 89nBJR7Qx+1kje2Z5RQRMlpx5NbhajrZ37eImWQkVdphSrgGtDJsR9sV4dW+FBkutVDl 03ATMubIy53akBi78Qvu/5uq2cnAOlK+ksrmfI4NekJn+PBh83D0xD/J0/2sdzoUCoHE otR9pjH2rwZpU7BH+vB+lcI+qpBaIhSAV6ke+Sthq00fNd1YXnIVOXcTmK8NeU5NswRm Aq4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to; bh=6h1BO+Ublm+bqDmO4u6xgTXYIXGvXDJxH2/Ewy5NlCI=; b=OZALNI15q6rNO+NwgN+LehEY61On87c3SqytgwtD7vL+gi8kgBCzQYWxtz4KT7AjAQ HdMF5KbBfGWlu1+lOmQ8LUeabGr2S8ipKL0DR55BsjA0xBvk7P0DWCKegQA5X6WPldVk hJWpoIxiw7mwflJzQuxjJXRpRhVw48A49/vyI24h9v13YI37QLfD0EqJkKB3d5CpEZCr GYBoLo2lcoMEv74Wh7h8s23N55qWGqUTxZSBv7og63MX5xoOiU4ajDQAo6r4jZu5Dqy7 KA3O67tmoLcQaJpTdwhMUAwxKvt1V/ek8QtL2KfZ1YIyGPWLxgfwfpr+SJVleaAQ1K6j 6pVQ== X-Gm-Message-State: AOPr4FV8n9DMeXetRwp6YgKYQwIojZOJA+jLf6PuKQaUBoovne+UuJWD2BCOlBtqfgL5Vw== X-Received: by 10.194.103.198 with SMTP id fy6mr20933938wjb.48.1460679661775; Thu, 14 Apr 2016 17:21:01 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id j71sm8894218wmj.21.2016.04.14.17.20.59 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2016 17:21:00 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 In-Reply-To: <87h9f4ghzg.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116479 Archived-At: This is a multi-part message in MIME format. --------------225349C907F5DEDBA0E2C219 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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. --------------225349C907F5DEDBA0E2C219 Content-Type: text/x-patch; name="vc-tests.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vc-tests.diff" 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. --------------225349C907F5DEDBA0E2C219--