File header substitution on check-in ( i.e. - $Header:$ )
In CVS we include a comment line with the string "$Header:$" at the top of the file. Then when we check a file in with this line, several pieces of information are substituted and updated. For example:
<!-- $Header: /cvsroot/myProject/abc/config/policy-R3p0.xml,v 1.33 2011/04/26 21:15:21 griswold Exp $ --> where: o "/cvsroot/myProject/abc/config/policy-R3p0.xml" is the library path where the updated file is stored o "v 1.33" indicates this is version 33. This number is automatically incremented every time a change to the file is checked in o "2011/04/26 21:15:21" timestamp when the change was checked in o "griswold" userid that checked in the change We use XML files extensively to specify configurable settings. Having a watermark inside the file to show its version and who and when it was last changed it is an important feature for us. Is there a similar feature in RTC? If so what needs to be done to enable it? I'm using RTC 3.0 client. Thanks. |
Accepted answer
Geoffrey Clemm (30.1k●3●30●35)
| answered Jun 27 '18, 5:51 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Note that the expansion of the following keywords is available in RTC 6.0.5:
The following keywords are supported:
$VersionId$ - The version ID of the file. $LongVersionId$ - The long version ID of the file (for example: VersionId@repoId). $ItemId$ - The UUID that identifies the file. $StateId$ - The UUID that identifies the specific state of the file. $Date$ - The date that the file in the repository was most recently modified. $Name$ - The name of the file in the repository. Geoffrey Clemm selected this answer as the correct answer
|
4 other answers
Geoffrey Clemm (30.1k●3●30●35)
| answered Jun 13 '11, 12:52 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 27 '18, 5:52 p.m. This functionality is requested in work item 43191.
|
Doug Griswold (16●1●2)
| answered Jun 22 '11, 9:44 a.m.
edited Jun 27 '18, 5:52 p.m. by Geoffrey Clemm (30.1k●3●30●35) Thank you for the pointer to the requirement.
|
Geoffrey Clemm (30.1k●3●30●35)
| answered Jun 22 '11, 7:59 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 27 '18, 5:55 p.m. Let's continue the discussion in work item 43191. (That makes it more
|
Geoffrey Clemm (30.1k●3●30●35)
| answered Jun 22 '11, 8:01 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 27 '18, 5:55 p.m. That is correct ... most modern SCM systems store this metadata
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
I think the keyword substitution redundantly duplicates information, the metadata is in the source control system. It's a holdover that the SVN project picked up when trying to develop a drop in replacement for CVS.
The XML still has to be deployed somewhere - is it just a checkout from RTC? It wouldn't be a lot of work to have the script that does the checkout add some version information to the files when a package is created or when the files are deployed.
I know it's silly but I don't like having to scroll through that junk, and really dislike the cruft in diffs (though the eclipse IDE will likely handle those intelligently). It seems there is always some guy who wants a block 20 lines long.