gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Keyword substitution, How can I automatically add v


From: Juraj Kubelka
Subject: Re: [Gnu-arch-users] Keyword substitution, How can I automatically add version to file?
Date: Wed, 19 Jan 2005 21:57:19 +0100
User-agent: Mutt/1.5.6+20040907i

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 
through menu in GUI (I think). So I cannot use `make' like process but 
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!
> > 
> > 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 read it is not possible with GNU Arch (tla). Do you think I can use
> > hook file? But how? When `$1 == commit' it is too late for updating
> > and when `$1 == 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).
> 
> You do NOT want to commit that information! That would produce bogus
> conflicts!
> 
> > 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.
> 
> 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 =RELEASE-ID with precisely this information.
> 
> 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!
> 
> 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:
> 
> VERSION=`tla logs -f -r | head -1`
> 
> (you can of course add decorations...:
> VERSION="arch-version: `tla logs -f -r | head -1`"
> )
> 
> If you wanted to do this from make instead, you would write:
> VERSION="-DVERSION=\"`tla logs -f -r | head -1`\""
> 
> and then just expand $(VERSION) on the build command.
> 
> 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.
> 
> > 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:
> 
> 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.
> 

Attachment: signature.asc
Description: Digital signature


reply via email to

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