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 j0JLMFOB017461 for ; Wed, 19 Jan 2005 21:22:16 GMT Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by spf3.us4.outblaze.com (Postfix) with ESMTP id C5A5A53768 for ; Wed, 19 Jan 2005 21:22:39 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrNTh-0005R3-JV for migo@homemail.com; Wed, 19 Jan 2005 16:35:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CrNSX-0005Gn-3y for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 16:33:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CrNSW-0005GM-EZ for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 16:33:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CrNMM-0003JJ-F9 for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 16:27:26 -0500 Received: from [213.235.135.82] (helo=avas2.tiscali.cz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CrMtO-0008N5-NA for gnu-arch-users@gnu.org; Wed, 19 Jan 2005 15:57:31 -0500 Received: from localhost (avas2.tiscali.cz [127.0.0.1]) by avas2.tiscali.cz (Postfix) with ESMTP id 70C99190114; Wed, 19 Jan 2005 21:57:27 +0100 (CET) Received: from avas2.tiscali.cz ([127.0.0.1]) by localhost (avas2.tiscali.cz [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06022-01-90; Wed, 19 Jan 2005 21:57:27 +0100 (CET) Received: from localhost (gwmhji1209.nsys.cz [213.235.108.34]) by avas2.tiscali.cz (Postfix) with ESMTP id 8058A190428; Wed, 19 Jan 2005 21:57:26 +0100 (CET) Received: from jura by localhost with local (Exim 4.43) id 1CrMtE-0006jD-Oe; Wed, 19 Jan 2005 21:57:20 +0100 Date: Wed, 19 Jan 2005 21:57:19 +0100 From: Juraj Kubelka To: Jan Hudec Subject: Re: [Gnu-arch-users] Keyword substitution, How can I automatically add version to file? Message-ID: <20050119205719.GA24450@cesta> References: <20050118203950.GA14564@cesta> <20050119092137.GB6310@vagabond> Mime-Version: 1.0 In-Reply-To: <20050119092137.GB6310@vagabond> X-Accept-Language: cs, sk, en-gb, en-us, en X-URL: http://cestikovo.com User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at tiscali.cz Cc: 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="===============0056718091==" 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: 4531 Lines: 123 --===============0056718091== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thank you very much. I'm going to learn how build-config works. Maybe I have problem we are using proprietary software in company with own compiler executable only=20 through menu in GUI (I think). So I cannot use `make' like process but=20 I know now I cannot use $Id$ like process because of merge conflicts. Thank you all for your assistance and for my new knowledge ;-) Jura On Wed 19.Jan 10:21, Jan Hudec wrote: > On Tue, Jan 18, 2005 at 21:39:50 +0100, Juraj Kubelka wrote: > > Hi! > >=20 > > I need add something like $Id$ from CVS to file and automatically > > update it before commit to new version. >=20 > 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. >=20 > > I read it is not possible with GNU Arch (tla). Do you think I can use > > hook file? But how? When `$1 =3D=3D commit' it is too late for updating > > and when `$1 =3D=3D precommit' it hasn't any effect. It is added to file > > but not committed. Also I have to execute `touch file' and then `tla > > changes --diffs' shows me not added difference (line). >=20 > You do NOT want to commit that information! That would produce bogus > conflicts! >=20 > > Do you have better idea? I need it because of tagging builds (binary > > files). I need to know relation between binaries in sources and it > > isn't good depend on human factor. >=20 > There are two options. Either you can have a precious (ie. not commited > but always preserved) file, that will be updated in hooks after replay, > update, star-merge and get. Unfortunately I am not sure the hooks are > there (and I fear they are not). However, if you use build-config, it > creates a file called =3DRELEASE-ID with precisely this information. >=20 > There is another possibility, that I'd consider best. In fact I have > already used that several times. Just find that information dynamicaly > during build! >=20 > I will assume that you want to set the information in configure script, > so shell assignment is the right way. If it's something else, modify > appropriately. Basicaly the trick is to call: >=20 > VERSION=3D`tla logs -f -r | head -1` >=20 > (you can of course add decorations...: > VERSION=3D"arch-version: `tla logs -f -r | head -1`" > ) >=20 > If you wanted to do this from make instead, you would write: > VERSION=3D"-DVERSION=3D\"`tla logs -f -r | head -1`\"" >=20 > and then just expand $(VERSION) on the build command. >=20 > If you want to keep the version after the arch information is stripped > (like for a release), than just make a script or build target, that > creates this version, that will write the information is some file > during the process. >=20 > > Can this tag line cause any branch merging problem? When every release > > in every branch has unique this line in file? I talk about line like: >=20 > Sure. It will always cause a conflict. Which is a reason why it was not > implemented. The workarounds mentioned above were good enough for > everybody so far so that nobody cared enough to define and implement > keyword substitution. >=20 --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iQEVAwUBQe7Jr3csGYtdTQZqAQICHQf/V95ApqJXCaPKezMfUzpvWE79JlyCY4td VyMaozgXy7ti3JdgW5LpFNCOyouiOs5RLm985dXV3jbIissLB5M4NlNGX/0ROo+Z IjZAxtW6/YwFo5cc+SC9pbwFujaAwSHv+yPz3doRoXVFz1svqTAKhP4fdzi9SB4u 0edjeUas5vCDlF819njXuWDPOTDc0Zp7Qqqnutpuf7ZgwTPpB/tAOK1pvpZT+02O miS/eCbTXgvYLHOHIBi6m5NtglhR9D9JSr+L5wiojo6d+oJhUIN53GgpC0chkdEG RQLP8CK6VilyLhcJm3zfhi2qwpqdtKThds5zJ5SlijLPhECTn7vEwA== =x1fo -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- --===============0056718091== 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/ --===============0056718091==--