[Top][All Lists]

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

Re: Checking vc-state recursively under a directory

From: Nikolaj Schumacher
Subject: Re: Checking vc-state recursively under a directory
Date: Wed, 23 Jul 2008 16:00:16 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Nordlöw <address@hidden> wrote:

> On 23 Juli, 15:03, Nikolaj Schumacher <address@hidden> wrote:
>> Nordlöw <address@hidden> wrote:
>> > 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")
> 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...

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.

Nikolaj Schumacher

reply via email to

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