From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: RE: vc-state always calls heuristic function Date: Tue, 23 Nov 2004 18:31:36 +0100 Message-ID: <1B3ACCFD5694A94DBA4E231402B0E9ED57AE59@mucmail1.sdm.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1101231181 16169 80.91.229.6 (23 Nov 2004 17:33:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Nov 2004 17:33:01 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 23 18:32:39 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CWeWs-0001qC-00 for ; Tue, 23 Nov 2004 18:32:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWefy-0005lS-Ah for ged-emacs-devel@m.gmane.org; Tue, 23 Nov 2004 12:42:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWefe-0005lH-Gt for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:41:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWefd-0005kr-M2 for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:41:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWefd-0005ko-HI for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:41:41 -0500 Original-Received: from [192.76.162.229] (helo=world1.sdm.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWeVu-0002Gl-Nc for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:31:39 -0500 Original-Received: from localhost ([127.0.0.1] helo=world1.sdm.de) by world1.sdm.de (MTA) via esmtp id 1CWeVu-0001wT-7l; Tue, 23 Nov 2004 18:31:38 +0100 Original-Received: from mucns1.muc.sdm.de ([193.102.180.22]) by world1.sdm.de (MTA) via esmtp id 1CWeVt-0001wN-Af; Tue, 23 Nov 2004 18:31:37 +0100 Original-Received: by mucns1.muc.sdm.de (MTA) via esmtp from localhost ([127.0.0.1] helo=sdmmail1.sdm.de) id 1CWeVt-0004vW-99; Tue, 23 Nov 2004 18:31:37 +0100 Original-Received: from mucmail1.sdm.de ([193.102.180.175]) by sdmmail1.sdm.de with Microsoft SMTPSVC(6.0.3790.0); Tue, 23 Nov 2004 18:31:36 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: vc-state always calls heuristic function Thread-Index: AcTRgO+Wp/HzpHp1Q1eUPgcMg2P6ZgAAHGpg Original-To: X-OriginalArrivalTime: 23 Nov 2004 17:31:36.0568 (UTC) FILETIME=[48827780:01C4D182] 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: main.gmane.org gmane.emacs.devel:30290 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30290 Stefan Monnier wrote: >> You see, that always the heuristic method of a backend is used >> [(vc-call state-heuristic file)] - even if a backend offers also >> a "real" statechecker. E.g. vc-cvs.el offers `vc-cvs-state' and >> `vc-cvs-state-heuristic'... But current implementation of `vc-state' >> will never use `vc-cvs-state'! Why?? >=20 > Why not? >=20 >> IMHO there should be a way so a user can customize if `vc-state' >> should use the heuristic approach or the real state-check if a >> backend offers both of them. What do you think? >=20 > It's the responsability of the backend. > vc.el uses `state-heuristic' when a heuristic is enough (e.g. in > vc-state) and uses `state' when it really needs fresh data (in > `vc-recompute-state').=20 ah, i didn't know the function `vc-recompute-state' - my fault.. >=20 > The backend is then free to always use fresh data, or to use a > heuristic when possible. Backends usually use a config var such as > vc-cvs-stay-local to decide which to choose. >=20 > What problem are you trying to solve? The next version of ECB (Emacs Code browser) will display the VC-state of sourcefiles with image-icons in its special browsable tree-windows. For this a function is needed to compute the VC-state of a file. Whic = one is used is customizable in an option of ECB - and currently `vc-state' = is used per default for the backend CVS, RCS and SCCS... and i have = wondered if there is a function available which performs real checks not only heuristic - now i know such a function - thanks Stefan! I think i will not use vc-recompute-state per default because especially = with remote repositories this can be very expensive - even the state-check is = performed stealthy and interruptable in the background as with ECB. But i want to mentionin the docstring of that ECB-option that there is another function `vc-recompute-state' a user can use if he works in a fast LAN and with a CVS-server in that LAN for example.... understandable? Ciao, Klaus >=20 >=20 > Stefan