[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-state always calls heuristic function

From: Stefan Monnier
Subject: Re: vc-state always calls heuristic function
Date: Tue, 23 Nov 2004 12:21:28 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> 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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]