Re: Control of version
Posted in 1997
In article <33B4BABF.5207@netcomuk.co.uk>, Ian Goddard
<igoddard@netcomuk.co.uk> writes
>Tim Schaefer wrote:
><snip>
>>
>> As for file-dependency chaining, this is something that I'd handle
>> in makefiles, but I learn new things every day. :-)
>>
>
>Make handles the fact that one file depends on another but how do you
>make it handle the fact that file2.4gl version 1.4 needs version 1.2 of
>file2.4gl and version 1.3 of file3.per?
>
Easy, notice that at any time if you take the latest version of
each file then they should combine to be a working product?
Just write a script which logs the latest version of each file to
another file E.g.
file1.4gl 1.3
file2.4gl 1.4
file1.per 1.2
etc...
This "build configuration" file can also be put under SCCS...
Build 1.1, Build1.2 etc..
At my current place we don't do this, we work under the idea that
the "current" version of all source files should combine to be a
working system. SCCS is only used so we can look into the current
live version of the program for a version number and then get the
associated source. This means we can track down line numbers in
Informix error messages or see what the code is doing.
Not I've also written a debug logging function which writes
information to a file to you can trace execution of a program
E.g.
CALL FN_debug_log("myfile.4gl","my_function",
"before open P_cursor1 - myvar1", myvar1)
OPEN P_cursor1 USING myvar1
CALL FN_debug_log("myfile.4gl","my_function",
"opened P_cursor1", "OK!!")
Would produce something like :-
File: myfile.4gl Function: my_function Date: 01/96/1997 Time 12:36:12
PID: 12033 Where: before open P_cursor1 - myvar1
12
File: myfile.4gl Function: my_function Date: 01/96/1997 Time 12:36:13
PID: 12033 Where: opened P_cursor1
OK!!
The function is written in C and on a "slow" (40Mhz) machine I can
manage several thousand calls in a few seconds with debugging disabled
so performance is not a problem. Just set an environment variable to
where you want the output to go and a logfile is produced.
Does anyone using use this idea to trace execution of program is a
live environment? I've found it really helps...
>Does PVCS do this? In RCS you're simply reduced to putting it in the
>version description.
>
>Defining the version of the database structure is even trickier. You
>could run dbschema after every change and give that a version number -
>but in practice migrating from one version to another might involve some
>ALTER TABLES and even some UPDATES (ALTERing a table to add a non-null
>column isn't a single step process and will involve an UPDATE that
>dbschema can't even capture). Such files must be applied to a specific
>version of the database.
>
>I'm currently working on a site which received updates of a 3rd party
>application every few weeks. I haven't counted the number of source &
>executable files in the system but it runs into thousands! Some of
>these releases involve changes to the database structure. Some of the
>code releases may include changes already installed at the site as
>bug-fixes made in advance of the general code release. This makes me a
>bit sensitive to these issues. The software house concerned seems to
>have nothing like RCS or SCCS in place at all!
>
>Ian
--
David Williams