Susan,

What I do is just the following:

Each source item has a version stamp block like the one below, installed and
maintained through various routines (editor, cutting scripts, command tools
etc). 
It holds version information for the item, the product and catalog
information e.g. for global catalog items:

*  Version Stamp
*  -------------
VERDATA=''
VERDATA := 'Version=001001009;'
VERDATA := 'VerDate=12345;'
VERDATA := 'VerProd=TOOLS;'
VERDATA := 'VerCopy=Copyright Brian Leach Consulting Limited;'
VERDATA := 'VerCo=Brian Leach Consulting Limited;'
VERDATA := 'VerDesc=Description of the program;'
VERDATA := 'VerCat=Catalog_Name;'
VERDATA := 'VerModule=GENERAL;'
VERDATA := 'VerModVer=001000000;'
VERDATA := 'VerHist=Comments for the last 10 version changes;'
 
Since it is assigned to a variable, it is compiled into the object code, and
the text format makes it easy to strip out the relevant pieces from the
object.

I can then use this to check the version of the object directly: for listing
through dictionary items, ensuring version-safe installations, global
catalog checks to ensure I don't catalog an old item over a new item, ensure
that I am editing the correct source, and the ability to check versions on
sites where products are released without source code and so forth.

When I commit to RCS, I capture the RCS stamp and the current version stamp
and index the two together, so I can use either in my RCS routines. I also
tag the index with the product version. I'm sure there are more elegant ways
to do that using the $ variables, but I havent had the time to go into
that.

It's not perfect - I can't stamp include files (but then I bind these in
with a precompiler anyway because of platform differences): and non-compiled
items e.g. paragraphs and PROCs have the same format just as comments.
Parameter records I always store in an INI format (more legible) so I could
stamp these in comments (I dont). Dictionaries I don't bother with, as I
always create dictionaries from scripts and stamp the scripts instead.

I'll post the routines when I get time to clean them up (that won't be for a
few weeks yet!)

Brian

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn
> Sent: 13 April 2005 16:43
> To: [email protected]
> Subject: [U2] [UV] Version Control
> 
> Brian,
> This intrigued.
> 
> >... version stamp your source code in a way that can be 
> saved into the
> object code
> 
> Where do you put it, what do you put there?
> What platform(s) have you done this on?  I know we dig into 
> the unix-level directories for their date ... (PRC checks 
> that the object is newer than the source or it won't deliver 
> (either/both)... and we have script/proc/macros/programs 
> whatever that can search and display those dates from unix) 
> ... but I'm interested in where you went with this.  I think 
> it's a good idea.  
> 
> Susan
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.0 - Release Date: 31/03/2005
>  
> 

-- 
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.0 - Release Date: 31/03/2005
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to