Since then I did a bunch of modifications. What I didn't like at all was the total hack that needs-merge and needs-patch turned out to be. After posting a stupid question on fossil-users, I realized what I really wanted was to know if the file would update if the
fossil update command was invoked. So I changed vc-fossil-state to use update. Also added a vc-fossil-dir-state to make the VC under dired go a lot faster.
Found out last night that the vc-*-dir-state is called for every directory in the tree and is expected to return the status for only the files in that dir, not for the subdirs.
So I changed the
update command to add these flags.
- -n | --nochange : do not change any files, but go through the motions.
- --local : do not autosync even if autosync is on in the settings
- -v : verbose, print messages even for UNCHANGED and EDITED
- --file name : only print status for file name. If name is a directory, print status for files in that directory, but not for subdirectories.
Now C-x v d on the fossil tree takes a few seconds. There's more speedup that can be done in update.c to filter out the subset earlier in the function if the
--file flag is specified.