From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandru Harsanyi Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: wrong behaviour of vc-workfile-unchanged-p Date: Sun, 16 Dec 2007 08:57:36 +0900 Message-ID: <76E35EAA-CFE4-4400-9456-1ECDBC167D3A@mac.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197776594 4509 80.91.229.12 (16 Dec 2007 03:43:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Dec 2007 03:43:14 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 16 04:43:25 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 1J3kPS-0002MJ-S1 for ged-emacs-devel@m.gmane.org; Sun, 16 Dec 2007 04:43:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J3kP9-0006dU-LK for ged-emacs-devel@m.gmane.org; Sat, 15 Dec 2007 22:43:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J3kP5-0006aZ-JV for emacs-devel@gnu.org; Sat, 15 Dec 2007 22:42:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J3kP3-0006VQ-Hg for emacs-devel@gnu.org; Sat, 15 Dec 2007 22:42:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J3kP3-0006Ut-Bc for emacs-devel@gnu.org; Sat, 15 Dec 2007 22:42:57 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J3kP2-000892-I6 for emacs-devel@gnu.org; Sat, 15 Dec 2007 22:42:57 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J3kP0-0006CM-PL for emacs-pretest-bug@gnu.org; Sat, 15 Dec 2007 22:42:55 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1J3kOv-00087o-Fe for emacs-pretest-bug@gnu.org; Sat, 15 Dec 2007 22:42:53 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J3j14-0007wV-Mh for emacs-pretest-bug@gnu.org; Sat, 15 Dec 2007 21:14:09 -0500 Original-Received: from hosted05.westnet.com.au ([203.10.1.219]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J3guB-0001yo-45 for emacs-pretest-bug@gnu.org; Sat, 15 Dec 2007 18:58:51 -0500 Original-Received: from hosted05.westnet.com.au (hosted05.westnet.com.au [127.0.0.1]) by hosted05.westnet.com.au (Postfix) with SMTP id 2F23A3F07E9 for ; Sun, 16 Dec 2007 08:57:17 +0900 (WST) Original-Received: from [10.0.1.5] (dsl-58-7-79-194.wa.westnet.com.au [58.7.79.194]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by hosted05.westnet.com.au (Postfix) with ESMTP id 629383F0FB6 for ; Sun, 16 Dec 2007 08:57:15 +0900 (WST) X-Mailer: Apple Mail (2.752.2) X-PMX-Branch: TNG-Outgoing X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:85164 gmane.emacs.pretest.bugs:20444 Archived-At: 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