[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: vc-state always calls heuristic function
From: |
klaus.berndl |
Subject: |
RE: vc-state always calls heuristic function |
Date: |
Tue, 23 Nov 2004 18:31:36 +0100 |
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??
>
> 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').
ah, i didn't know the function `vc-recompute-state' - my fault..
>
> 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?
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
>
>
> Stefan
- vc-state always calls heuristic function, klaus.berndl, 2004/11/23
- RE: vc-state always calls heuristic function,
klaus.berndl <=
- RE: vc-state always calls heuristic function, klaus.berndl, 2004/11/24
- RE: vc-state always calls heuristic function, klaus.berndl, 2004/11/24
- RE: vc-state always calls heuristic function, klaus.berndl, 2004/11/24
- RE: vc-state always calls heuristic function, klaus.berndl, 2004/11/24
- RE: vc-state always calls heuristic function, klaus.berndl, 2004/11/24