MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture RCS revision information for a sysbld model

We would like to capture the revision number
of a sysbld model that is under RCS version
control using a text block.

The approach that is taken is similar to the
way that is done for C source filea - RCS keyword
"$Revision$" is inserted in a comment line
which will be substituted by the actual revision
of the checked out version.

For the sysbld models a text block with the RCS
keyword "$Revision$" inserted in its "code"
section is added to the model and it is saved
as an ascii file. It was expected that after
a checkin and checkout the text block shows
"$Revision: 1.2$". However, this was not the
case and after loading the model the
text block appears as an empty box - apparently
the
sysbld file includes other information
regarding the text block which conflicts
with the manual change to the text block
"code" string.

Any suggestion on how to resolve this
problem or using another approach to
achieve the same goal?



Thanks
0 Kudos
Message 1 of 3
(7,464 Views)
Farshid,
As I understand it it is the RCS software that replaces the $Revision$ with $Revision: 1.2$. Is that correct?

There are two things that you need to be aware of if this is the case.
First, the length of the text fields are saved as part of the SystemBuild model file. This means that when the revision control software replaces the tag the length is no longer correct, and SystemBuild will not be able to load the file correctly. You can still change the text as long as you make sure the the length of the tag stays the same. For example if the version number is a single digit decimal then single digit, then when you create the file you could store the revision as $Revision: x.x$. When the tag gets replaced by the revision control software you would get
$Revision: 1.2$ which is the same length.
Next you need to be aware of potential line breaks. When the SystemBuild model is saved as ASCII then line breaks are added at regular intervals, so the tag might be broken up on two lines. This could prevent the revision control software from recognizing the tag. To prevent this save the file as binary.

In short make sure that the text the revision control software adds is the same length as the text that it replaced and save the files as binary files.

Carl L
National Instruments
www.ni.com/matrixx
0 Kudos
Message 2 of 3
(7,464 Views)
After many experiments, I can not find a reliable method to get the revision information within the TextBlock. Eventually, the string will get too large and then be interpreted incorrectly and corrupt the model.

We will have to address this functionality in a future release.
0 Kudos
Message 3 of 3
(7,464 Views)