From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: vc-state always calls heuristic function Date: Tue, 23 Nov 2004 12:21:28 -0500 Message-ID: References: <1B3ACCFD5694A94DBA4E231402B0E9ED57AE54@mucmail1.sdm.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1101230528 14023 80.91.229.6 (23 Nov 2004 17:22:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Nov 2004 17:22:08 +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:21:57 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 1CWeMW-0000kG-00 for ; Tue, 23 Nov 2004 18:21:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWeVd-0003BD-Fs for ged-emacs-devel@m.gmane.org; Tue, 23 Nov 2004 12:31:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWeVV-0003Aq-M2 for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:31:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWeVU-0003A1-6T for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:31:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWeVR-00039x-Ts for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:31:11 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWeMI-00082S-OJ for emacs-devel@gnu.org; Tue, 23 Nov 2004 12:21:42 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 709418282AB; Tue, 23 Nov 2004 12:21:42 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 7F0A44AC50B; Tue, 23 Nov 2004 12:21:28 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 6896A8CA69; Tue, 23 Nov 2004 12:21:28 -0500 (EST) Original-To: In-Reply-To: <1B3ACCFD5694A94DBA4E231402B0E9ED57AE54@mucmail1.sdm.de> (klaus berndl's message of "Tue, 23 Nov 2004 17:57:01 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=0, requis 5) X-MailScanner-From: monnier@iro.umontreal.ca 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:30289 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30289 > 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?? Why not? > 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? 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'). 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. What problem are you trying to solve? Stefan