From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: wrong behaviour of vc-workfile-unchanged-p Date: Tue, 18 Dec 2007 18:37:46 -0500 Message-ID: References: <76E35EAA-CFE4-4400-9456-1ECDBC167D3A@mac.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1198021102 7737 80.91.229.12 (18 Dec 2007 23:38:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2007 23:38:22 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Alexandru Harsanyi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 19 00:38:33 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J4m19-0004J4-Jr for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2007 00:38:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4m0q-0002P7-CW for ged-emacs-devel@m.gmane.org; Tue, 18 Dec 2007 18:38:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4m0S-00020E-Rw for emacs-devel@gnu.org; Tue, 18 Dec 2007 18:37:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4m0R-0001z5-Pc for emacs-devel@gnu.org; Tue, 18 Dec 2007 18:37:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4m0R-0001yt-Kn for emacs-devel@gnu.org; Tue, 18 Dec 2007 18:37:47 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4m0R-0006jq-Bt; Tue, 18 Dec 2007 18:37:47 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1J4m0Q-0003hC-Vp; Tue, 18 Dec 2007 18:37:47 -0500 In-reply-to: <76E35EAA-CFE4-4400-9456-1ECDBC167D3A@mac.com> (message from Alexandru Harsanyi on Sun, 16 Dec 2007 08:57:36 +0900) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:85269 gmane.emacs.pretest.bugs:20459 Archived-At: Would someone please DTRT and ack? Mime-Version: 1.0 (Apple Message framework v752.2) Message-Id: <76E35EAA-CFE4-4400-9456-1ECDBC167D3A@mac.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: emacs-pretest-bug@gnu.org From: Alexandru Harsanyi Date: Sun, 16 Dec 2007 08:57:36 +0900 Cc: Subject: wrong behaviour of vc-workfile-unchanged-p When calling `vc-next-action' (C-x v v) on a file which has no changes, vc.el will prompt with a message to revert to the master version for RCS or say that the file is up to date for CVS. Unfortunately, this does not work corectly when the file is unchanged but its timestamp is more recent than the checkout time. Consider this scenario: 1/ Create a new file and register it with RCS 2/ Checkout the file (C-x v v). 3/ Type C-x v v again. Emacs will ask whether to revert to the master version, since the file is unchanged. 4/ Modify the file, save it, undo the changes and save it again. This will have the effect that the file will have the same contents as when checked out but a more recent modification time. 5/ Type C-x v v again. Emacs will pop-up the VC-Log buffer than checkin the file. The problem seems to be in `vc-workfile-unchanged-p': if the checkout time is available for a file, it is compared against the modification time and the "unchanged " decision is made on that alone, without consulting the backed specific function (vc-rcs-workfile-unchanged-p or vc-default-workfile-unchanged-p) I believe vc-workfile-unchanged-p and if the two timestamsps are the same, it can conclude that the file is unchanged, but if the timestamps are different, it should call the backend specific workfile-unchanged-p function. Best Regards, Alex. In GNU Emacs 22.1.50.2 (powerpc-apple-darwin8.9.0, Carbon Version 1.6.0) of 2007-06-09 on karinji.local Windowing system distributor `Apple Inc.', version 10.4.11 configured using `configure '--enable-carbon-app'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: iso-8859-1 default-enable-multibyte-characters: t Major mode: Text Minor modes in effect: encoded-kbd-mode: t show-paren-mode: t global-cwarn-mode: t display-time-mode: t whitespace-global-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-x C-f p k e m / l i s / v c / . C-s w o r k f i e l e - u n c C-s C-w C-s C-s C-s C-s C-s C-h f C-x C-f v c - h o C-x 1 C-s C-s C-x C-f O t h M-> + R C S C-x C-f t e s t . t x t C-SPC M-> C-w a b c d e f C-x C-s C-x v i C-x v v C-x v v C-g d e f C-x C-s C-a C-k C-x C-s C-x v = C-x v v C-x 0 M-x r e p o r t Recent messages: Press C-c C-c when you are done editing. Registering /Users/haral/Other/testing/test.txt... done Checking out /Users/haral/Other/testing/test.txt...done Quit Wrote /Users/haral/Other/testing/test.txt [2 times] No changes to /Users/haral/Other/testing/test.txt since latest version Mark set Press C-c C-c when you are done editing. Enter a change comment. Type C-c C-c when done Loading emacsbug...done _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel