[Top][All Lists]

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

Re: autorevert and vc

From: Stefan Monnier
Subject: Re: autorevert and vc
Date: 30 Mar 2004 19:24:39 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> When you call vc-find-file-hook to recompute the version control state,
> all that happens for CVS, RCS and SCCS is a check of file modification
> times or permissions (for MCVS it's similar, SVN and Arch are slightly
> more expensive, I think).

> The idea is that backends can provide a vc-BACKEND-state-heuristic
> function, which guesses the state by doing a fast operation like a
> permission check or mtime check.  If no state-heuristic function is
> provided, then each computation of the state likely involves an
> expensive call to the backend system.

Actually in some backends, neirther `state' nor `state-heuristic' is used
because the heuristic state is computed directly by vc-BACKEND-registered.
In others (such as vc-arch.el), there is no `state-heuristic' but the
`state' operation is very fast (heuristic).

> So, you might fine-tune your algorithm to only re-compute the vc-state
> every five seconds *if* the backend has a state-heuristic function.
> (You can use vc-find-backend-function to determine that.)

Sounds fair.  I should adjust vc-arch accordingly, which is probably the
right thihng to do anyway.

> Stefan's suggestion (vc-stale-state-p) is potentially more generic, but
> perhaps it's better to wait until there is a backend where the existing
> mechanism really isn't expressive enough.  Stefan, what do you think?

No preference.


reply via email to

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