[Top][All Lists]

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

Re: Introducing 'unrecognized and 'ignored

From: Alexandru Harsanyi
Subject: Re: Introducing 'unrecognized and 'ignored
Date: Sat, 29 Dec 2007 11:48:58 +0900

On 29 Dec 2007, at 2:45 AM, Eric S. Raymond wrote:

I've spent the last couple of hours looking at this issue.
A reminder: the payoff for getting it right would be another
significant speedup in (vc-dired-hook), which would translate to
a faster C-x v d display.

Remarkably, it looks as if the code does not actually depend
in any significant way on the nil return from (vc-state file) meaning
that FILE is unregistered.  Tests that might have used this method
use vc-backend instead.  So introducing an 'unregistered state
shouldn't actually break anything.

Alex Harsanyi: A cvs-ignorable-file-p would actually be useful, if
you're still interested. Under later systems it's faster to get this
by doing a bit of estra parsing of rge status report.

I had a look at the problem last night and wrote the code to load a cvsignore file and produce a regexp to match the ignored files, however the whole mechanism required by `vc-BACKEND-ignorable-file-p' is quite tricky to implement corectly (in a way that both Emacs and the backend agree 100% on what files are ignored). Here are two of the problems I found when I looked at an implementation for CVS:

* CVS will ignore a file only if it is unregistered. For example .o files are ignored from a CVS status listing, but if an .o file is registered than that file will show up in the listing. This requires checking whether a file is registered or not, a thing which we try to avoid.

* There's a 'per-repository' cvsignore file at $CVSROOT/CVSROOT/ cvsignore which Emacs cannot access directly for remote repositories.

With extended vc-state states I don't think there is a need for `vc- ignorable-file-p' at all: `vc-BACKEND-dir-state' should set the state for each registered file and for files it can register. `vc- dired-hook' can than simply look for the vc-state property and if it is missing it can assume that the file is ignored.

Best Regards,

reply via email to

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