My reason for asking is that I am writing some emacs lisp snippets
that auto-update-and-rebuild() my Emacs add-ons directly from within
their vc-repositories.
Thanks in advance,
Nordlöw
> Is it somehow possible to check whether all the files under a version-
> controlled directory are all up-to-date (updated)? That is like vc-
> state() but recursively for a directory?
What do you mean? up-to-date or updated? up-to-date means
(not (vc-workfile-unchanged-p "file")), while updated means something like
(file-newer-than-file-p "file.elc" "file.el")
> My reason for asking is that I am writing some emacs lisp snippets
> that auto-update-and-rebuild() my Emacs add-ons directly from within
> their vc-repositories.
Maybe `byte-recompile-directory' could be of help.
regards,
Nikolaj Schumacher
I mean like vc-state but for a whole repository, say vc-dir-state(DIR)
and should be behave something like the following (using CVS as
example):
A function that runs "cvs update" and return, say 'up-to-date, if no
file in repository was changed otherwise say 'patched.
If this function returns 'patched we know that something was changed
and we need to rebuild things...
/Nordlöw
I looking for a function, say vc-dir-update(DIR), that does "cvs
update" under DIR and returns 'up-to-date if no file was changed or
'patched if some file was updated.
/Nordlöw
I've never used CVS, so think SVN when reading... :)
Since you don't have a revision to compare against that function would
not be idempotent, and if you called "cvs update" manually in-between,
it wouldn't catch the change, either. That's different from what
`vc-state' does, which compares the working copy against the
checkout-out revision (like "svn status"), but doesn't check if the
repository has something newer.
So "like `vc-state'" and what you described are different. Which one do
you want? :)
In SVN you could store the revision when doing a build, and then compare
it to HEAD when deciding whether to do a rebuild.
regards,
Nikolaj Schumacher
I think that 'vc-recompute-state is what you want, as it will actually
run "cvs update".
try something like the following (this currently doesn't work because
directory-files is also returning things like the CVS folder which vc-
recompute-state throws an error because it doesn't know how to handle
it):
(progn
(let ((retval nil))
(dolist (cur-file (directory-files dir-path t "^[^\.]") retval)
(push (vc-recompute-state cur-file) retval))))
hopefully that is close to what you're looking for :-)
-Thr4wn
>
>
> regards,
> Nikolaj Schumacher
>
>
--
Replace the obvious in my email address with the first three letters of the hostname to reply.