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#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times) Date: Wed, 04 Jul 2012 20:42:40 +0400 Message-ID: <4FF47280.7040709@yandex.ru> References: <4FE2832A.1030308@yandex.ru> <4FE994E8.9020605@yandex.ru> <87zk7qs21q.fsf@gmx.de> <4FEBAAAA.3030102@yandex.ru> <87d34igrie.fsf@gmx.de> <4FEDD2A0.3010300@yandex.ru> <878vf66pgw.fsf@gmx.de> <4FEDDFD8.1010407@yandex.ru> <87wr2pgoiy.fsf@gmx.de> <4FEEF763.2060806@yandex.ru> <878vf5544d.fsf@gmx.de> <4FEF3A87.6000904@yandex.ru> <874nps63ki.fsf@gmx.de> <4FEF500A.9060103@yandex.ru> <87pq8f4xbv.fsf@gmx.de> <4FF062D7.7050402@yandex.ru> <878vf2sf7q.fsf@gmx.de> <4FF197A6.7060807@yandex.ru> <871ukrr297.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1341420212 2302 80.91.229.3 (4 Jul 2012 16:43:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Jul 2012 16:43:32 +0000 (UTC) Cc: 11757@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 04 18:43:31 2012 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 1SmSfk-0007ba-Lp for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jul 2012 18:43:24 +0200 Original-Received: from localhost ([::1]:57848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmSfj-0002V6-LS for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Jul 2012 12:43:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmSfd-0002Uy-CW for bug-gnu-emacs@gnu.org; Wed, 04 Jul 2012 12:43:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmSfb-0002TU-Hc for bug-gnu-emacs@gnu.org; Wed, 04 Jul 2012 12:43:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmSfb-0002TQ-79 for bug-gnu-emacs@gnu.org; Wed, 04 Jul 2012 12:43:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SmSkE-0000Mc-AL for bug-gnu-emacs@gnu.org; Wed, 04 Jul 2012 12:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Jul 2012 16:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11757 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11757-submit@debbugs.gnu.org id=B11757.13414204521362 (code B ref 11757); Wed, 04 Jul 2012 16:48:02 +0000 Original-Received: (at 11757) by debbugs.gnu.org; 4 Jul 2012 16:47:32 +0000 Original-Received: from localhost ([127.0.0.1]:48218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmSjj-0000Lu-PD for submit@debbugs.gnu.org; Wed, 04 Jul 2012 12:47:32 -0400 Original-Received: from forward15.mail.yandex.net ([95.108.130.119]:37946) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmSjf-0000Lk-Fq for 11757@debbugs.gnu.org; Wed, 04 Jul 2012 12:47:29 -0400 Original-Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward15.mail.yandex.net (Yandex) with ESMTP id 517D79E3228; Wed, 4 Jul 2012 20:42:38 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1341420158; bh=7z0eKsoY/+q1pkxrheQ3CIJhhCliuN7HPyAifpxsB8U=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qFBu5jOwiFDnbIE7+wPf6C1B1VEZqgX82Z/R5yA3BKjyQtNlnqmdzom/Qfv72yp0n pSFNpOHPtCZ4CIrwyE11X8aiIxCuwP3qMazSlHYyDvPBvHnPRYxAUHl9OqwttxXuDi QBGlVJJlAgsIeF1zVIPuQjKtolYYOHu8JCXeai70= Original-Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id 30A5B1B6064A; Wed, 4 Jul 2012 20:42:38 +0400 (MSK) Original-Received: from 98-87.nwlink.spb.ru (98-87.nwlink.spb.ru [178.252.98.87]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id gb7e2UpY-gb7eXZGt; Wed, 4 Jul 2012 20:42:37 +0400 X-Yandex-Rcpt-Suid: michael.albinus@gmx.de X-Yandex-Rcpt-Suid: 11757@debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1341420158; bh=7z0eKsoY/+q1pkxrheQ3CIJhhCliuN7HPyAifpxsB8U=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=DRbCOxY8CGynROY1oq5ZebTWbG/yKRjKY5T1CEYjk58GRN/KZnslNX3faJ2ipvGWg D+Wl2t7l8uW6Ed7OxRgKrfHCd3IGx8+73tdkHqzSYmfuUiZ6sS4ovVfyA+o1iMyhHM h/SW2Rwd/Skm9hL7cweEBjns5WrZpxzW8sGtg05U= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <871ukrr297.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61574 Archived-At: On 04.07.2012 19:10, Michael Albinus wrote: >> Was the file absent in the branch test after checkout? If not, this >> case is no different from the first. >> Basically, we need a scenario in which `vc-next-action' will need to >> call `vc-git-register' on a file that recently has been considered >> up-to-date. > > If we assume, any command outside Emacs can happen which invalidates the > cached status of a file, we must clear all caches and recompute all > files state when vc-next-action is called. To the given cost. I'd have no problem with this, actually - this function is called considerably less often than `find-file' or `save-buffer'. > In Tramp, I have similar problems with stale caches. Finally, I've added > timestamps to every cached value, and I use cheap tests to check whether > the cache is out of date. No idea, whether we want go this direction in > vc, too. Can't commend on that. > If we assume that there are no dangerous vc commands outside Emacs, we > wouldn't have a problem. In this case, the behavior of the first patch I posted here should be acceptable, right? It's simpler, has pretty much the same effect, and should be a tiny bit faster. >> The logic is rather complicated there, so I might easily be missing >> some examples. > > Yes. I don't know, whether we will be able to handle any surprise when > using caches. There will always be a scenario which lets fail a given > algorithm. I fear. Sure, but I'm just asking for one scenario that works better with explicitly caching 'git-registered, instead of not calling it in `vc-git-state'. If `vc-git-state' doesn't call `vc-git-registered' (just assumes it's t), then `vc-registered' is the latter's only client, and so its return value is implicitly cached in 'vc-backend property.