From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Van Holder Newsgroups: gmane.emacs.bugs Subject: bug#7905: 24.0.50; VC not updating file status properly anymore after commit from vc-dir Date: Mon, 31 Jan 2011 10:06:17 +0100 Message-ID: References: <87zkqqmvaz.fsf@leeloo.anubex.internal> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1296466552 28348 80.91.229.12 (31 Jan 2011 09:35:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 09:35:52 +0000 (UTC) Cc: 7905@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 31 10:35:47 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjqAj-0003kP-M4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Jan 2011 10:35:45 +0100 Original-Received: from localhost ([127.0.0.1]:34318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjqAi-0000Kz-Vj for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Jan 2011 04:35:45 -0500 Original-Received: from [140.186.70.92] (port=39343 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjqAb-0000Iu-5W for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2011 04:35:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjqAZ-0004S7-G0 for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2011 04:35:37 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjqAZ-0004S3-EE for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2011 04:35:35 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PjpbC-0004pS-AM; Mon, 31 Jan 2011 03:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tim Van Holder Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Jan 2011 08:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7905 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7905-submit@debbugs.gnu.org id=B7905.129646430718465 (code B ref 7905); Mon, 31 Jan 2011 08:59:02 +0000 Original-Received: (at 7905) by debbugs.gnu.org; 31 Jan 2011 08:58:27 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pjpac-0004nk-A8 for submit@debbugs.gnu.org; Mon, 31 Jan 2011 03:58:26 -0500 Original-Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pjpaa-0004nO-HN for 7905@debbugs.gnu.org; Mon, 31 Jan 2011 03:58:25 -0500 Original-Received: by wyf23 with SMTP id 23so5562651wyf.3 for <7905@debbugs.gnu.org>; Mon, 31 Jan 2011 01:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZUOqE1zyCdb3iwgRIRku8dwwpUASOL1+2ceGUL4UFT4=; b=BCXVdkbXwvhtipiuFe/EbE9arH51Q/14kG7/rZhJqEpc8sV55voawTpQOnsvDgPtgf 8dpJdzkmSQ4PK7Hv2VMA8VLhHRUuwwDhVH1QOlCZEkCA7G8t9ez2KrIOmtjoZM/rawPZ 9f/P2/zoqF53UPJnhB/HA5z5bxZjOl7k55e4s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=d6B8PySL3FfcaOSkqsw0pBrkmE6JwACr/c64N7Z0np9cz98U2sc6DSLmbjYktLlZFH juV845NzFzxYxVVq7azEQKiyJJxmnfOYr9L91WW1NFE3KhHaOZRQY+URULXyy2cjxlKu 1L0ECh+7T0kXEVLwI9z4WwMT1NG+LvTpqv3Kw= Original-Received: by 10.216.238.94 with SMTP id z72mr3652002weq.0.1296464777896; Mon, 31 Jan 2011 01:06:17 -0800 (PST) Original-Received: by 10.216.181.203 with HTTP; Mon, 31 Jan 2011 01:06:17 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 31 Jan 2011 03:59:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43779 Archived-At: On 28 January 2011 19:16, Glenn Morris wrote: > Tim Van Holder wrote: > >> Think I see the problem being caused by vc-cvs-state-heuristic; > > This doesn't make sense to me, because vc-dir supposedly never uses that. > But if so, setting vc-cvs-stay-local to nil should make everything work. I checked the file-is-considered-edited-on-open behaviour, and there vc-cvs-state-heuristic seems to be the culprit; as I mentioned, vc-dir did not consider all files as modified. Also, vc-dir correctly identifies the state after a 'g', so vc-dir seems to work correctly in and of itself. I'm assuming the update-status-in-vc-dir behaviour after a commit relies on local operations, so if it expects to run vc-cvs-state-heuristic on the newly-committed files to get their new state, it could be the culprit there too. >> it uses the file's checkout property: >> =C2=A0 (vc-file-getprop file 'vc-checkout-time) >> But this seems to always return 0 when I try to open a CVS-controlled >> file, which means vc-cvs-state-heuristic will only report either >> 'added or 'edited. > > Maybe edebugging vc-cvs-parse-entry will show why this is so. Aha - it looks like it's a timezone thing. vc-cvs-parse-entry does everything right, except that it tries to compare the file's mtime with the time from CVS/Entries, assuming UTC as timezone for it (which is correct for CVS/Entries but apparently not for mtime). In my case, they differ by an hour: $ date; date --utc Mon Jan 31 09:50:50 CET 2011 Mon Jan 31 08:50:50 UTC 2011 $ grep foo CVS/Entries /foo/1.297.2.24/Mon Jan 31 08:30:58 2011//Tmytag $ stat foo File: `foo' Size: 75579 Blocks: 160 IO Block: 4096 regular file Device: 808h/2056d Inode: 8142863 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ tim) Gid: ( 1000/ tim) Access: 2011-01-31 09:37:57.000000000 +0100 Modify: 2011-01-31 09:30:58.000000000 +0100 Change: 2011-01-31 09:31:00.000000000 +0100 As a result, checkout-time is set to 0 (and state to edited). Running "TZ=3DUTC emacs" shows the problem going away (both the vc-dir state change and the file-edited-on-open). So perhaps mtime needs decode-time applied, and then the zone argument applied to the time info (I would expect there to be a function for that already, but I didn't see one offhand). > Perhaps the CVS/Entries file has an unexpected format. Doubtful, since this also affected fresh clean sandboxes (like the one in the sample).