From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Checking vc-state recursively under a directory Date: Wed, 23 Jul 2008 16:00:16 +0200 Message-ID: References: <0e75864d-6e18-45e5-93d5-73757209b817@x35g2000hsb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1216822279 18227 80.91.229.12 (23 Jul 2008 14:11:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jul 2008 14:11:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?Nordl=C3=B6w?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 23 16:12:08 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KLf4D-0007HC-Qj for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Jul 2008 16:11:46 +0200 Original-Received: from localhost ([127.0.0.1]:39731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLf3K-0000UU-5i for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Jul 2008 10:10:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLetc-0005aB-91 for help-gnu-emacs@gnu.org; Wed, 23 Jul 2008 10:00:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLeta-0005Zu-DX for help-gnu-emacs@gnu.org; Wed, 23 Jul 2008 10:00:47 -0400 Original-Received: from [199.232.76.173] (port=48847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLeta-0005Zr-9U for help-gnu-emacs@gnu.org; Wed, 23 Jul 2008 10:00:46 -0400 Original-Received: from fmmailgate02.web.de ([217.72.192.227]:53532) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLetZ-0004JW-Nj for help-gnu-emacs@gnu.org; Wed, 23 Jul 2008 10:00:46 -0400 Original-Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate02.web.de (Postfix) with ESMTP id 21FDAE6DF327; Wed, 23 Jul 2008 16:00:45 +0200 (CEST) Original-Received: from [136.199.55.225] (helo=aragorn.uni-trier.de) by smtp05.web.de with asmtp (WEB.DE 4.109 #226) id 1KLetX-00039W-00; Wed, 23 Jul 2008 16:00:43 +0200 In-Reply-To: <0e75864d-6e18-45e5-93d5-73757209b817@x35g2000hsb.googlegroups.com> (=?utf-8?Q?=22Nordl=C3=B6w=22's?= message of "Wed\, 23 Jul 2008 06\:30\:08 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Sender: n_schumacher@web.de X-Provags-ID: V01U2FsdGVkX1+bI3WhPQE53tKm09goJ4N0XlWz+psK4toSG3ea oIzHabpAHu/bSjG+ZxP+9y3kfnMGDQXtEn3SXdqUQyqQYn5Y7Y BYoxXVRoF8239ej0mWWw== X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55861 Archived-At: Nordl=C3=B6w wrote: > On 23 Juli, 15:03, Nikolaj Schumacher wrote: >> Nordl=C3=B6w 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? =C2=A0up-to-date or updated? =C2=A0up-to-date means >> (not (vc-workfile-unchanged-p "file")), while updated means something li= ke >> (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. regards, Nikolaj Schumacher