Received: from spf3.us4.outblaze.com (spf3.us4.outblaze.com [205.158.62.25]) by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id j0JGH3U4029074 for ; Wed, 19 Jan 2005 16:17:04 GMT Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by spf3.us4.outblaze.com (Postfix) with ESMTP id 6BEEB53C00 for ; Wed, 19 Jan 2005 16:17:26 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrIiI-0004SF-9u for migo@homemail.com; Wed, 19 Jan 2005 11:29:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CrIgG-0003Zr-PW for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 11:27:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CrIgE-0003Yj-Qu for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 11:27:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrIgE-0003Xc-8Z for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 11:27:38 -0500 Received: from [128.255.17.47] (helo=server07.icaen.uiowa.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CrIUF-0000ZF-GB for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 11:15:15 -0500 Received: from server11.icaen.uiowa.edu (server11.icaen.uiowa.edu [128.255.17.51]) by server07.icaen.uiowa.edu (8.13.2/8.12.9) with ESMTP id j0JG9Sef014970; (envelope-from ) Wed, 19 Jan 2005 10:09:28 -0600 (CST) Received: from [10.0.0.19] ([64.241.37.140]) (authenticated user=jfmeinel) by server11.icaen.uiowa.edu (8.13.2/smtp-serv-1.7) with ESMTP id j0JG9NUb026312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256); (envelope-from ) Wed, 19 Jan 2005 10:09:27 -0600 (CST) Message-ID: <41EE8633.4030208@arbash-meinel.com> Date: Wed, 19 Jan 2005 10:09:23 -0600 From: John Arbash Meinel User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jan Hudec Subject: Re: [Gnu-arch-users] Keyword substitution, How can I automatically add version to file? References: <20050118203950.GA14564@cesta> <20050119092137.GB6310@vagabond> In-Reply-To: <20050119092137.GB6310@vagabond> X-Enigmail-Version: 0.89.6.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-Virus-Scanned: ClamAV 0.80/640/Thu Dec 23 12:48:27 2004 clamav-milter version 0.80j on clamav.icaen.uiowa.edu X-Virus-Scanned: ClamAV 0.80/655/Fri Jan 7 07:54:13 2005, clamav-milter version 0.75 on clamav.icaen.uiowa.edu X-Virus-Status: Clean X-Virus-Status: Clean Cc: Juraj Kubelka , gnu-arch-users@gnu.org X-BeenThere: gnu-arch-users@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: a discussion list for all things arch-ish List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0652820133==" Sender: gnu-arch-users-bounces+migo=homemail.com@gnu.org Errors-To: gnu-arch-users-bounces+migo=homemail.com@gnu.org Status: RO Content-Length: 3508 Lines: 97 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0652820133== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8A068800F7815125D82369CE" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8A068800F7815125D82369CE Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jan Hudec wrote: >On Tue, Jan 18, 2005 at 21:39:50 +0100, Juraj Kubelka wrote: > > >>Hi! >> >>I need add something like $Id$ from CVS to file and automatically >>update it before commit to new version. >> >> > >That's not possible. It is too complicated to handle this in mergeing to >be worth the trouble. Especialy since tla relies on external diff/patch, >that can't easily be given special hooks. > > > I have to agree. I've used the CVS $Id$ and if you ever have to do any merging, you get conflicts all over the place (even with CVS). svn is supposedly better in that they store the unexpanded form in the repository, and only expand after everything is done, but that is a lot of work to make sure you don't do bad things. I personally use a version file which is generated with every build. (version.hpp, version.cpp). It includes the short form of the version (0.7) and the long form (my@archive--2005/cat--branch--0.7--patch-23). If you really wanted, you could easily bind to the post-commit hook (I think this is just "commit"), and re-generate the file then. I take the above approach because I also check to see if there are any uncommitted changes, and if so, I add a "+" to the end of the revision form. Having the string allows me to compile in the version of the tree, such that at runtime you can ask the program what version/revision it is. The really nice thing is that you only need 1 of these to completely define the entire project tree. One of the problems with CVS $Id$ is that it only defines the version of *that* file. If you wanted to runtime query the program, you technically need the $Id$ from *every* file so that you can truly qualify what went into the program. When I had to do it in the past with CVS, I used $Name$ and then you have to do special checkouts to get that expanded (I think -kkv or something, it's been a while). `tla logs -rf | head -1` is much simpler. Now, if you are saying that you need $Id$ because you are giving the source out to people, but stripping the {arch} directory, I still advocate the version file, since again, it can define the entire tree, rather than just one or two files. John =:-> --------------enig8A068800F7815125D82369CE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB7oYzJdeBCYSNAAMRAs5QAKCnPZ3w/tP1MczcHCVdKQC0okbeFwCcCT5f wv9qHJs/6R1cFL7Wk/Do7tA= =3KAF -----END PGP SIGNATURE----- --------------enig8A068800F7815125D82369CE-- --===============0652820133== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Gnu-arch-users mailing list Gnu-arch-users@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-arch-users GNU arch home page: http://savannah.gnu.org/projects/gnu-arch/ --===============0652820133==--