Suggestion: Add "label" as a keyword string.
Moderator: SourceGear
-
- Posts: 55
- Joined: Thu Dec 02, 2004 1:59 pm
Suggestion: Add "label" as a keyword string.
It would be useful to have "label" as an expandable keyword string. Given that we plan to use labels that match our product release number it would be useful to be able to refer to this label as a keyword string in files that report this information via a "help about" menu selection, without having to edit our source each time we issue a new release.
Just a suggestion.
Just a suggestion.
-
- Posts: 55
- Joined: Thu Dec 02, 2004 1:59 pm
This might be more difficult than it sounds.
What we would like to do is to have a "label" keyword expanded to equal the label used when doing a "Get Label". The default behavior when doing a simple "Get" might be to expand the label to the latest label applied to the given source file.
The purpose of this feature would be to enable us to automatically update a source module with release information that is based on the label applied in Vault, without having to edit the file each time we release/label our product.
Does this help?
What we would like to do is to have a "label" keyword expanded to equal the label used when doing a "Get Label". The default behavior when doing a simple "Get" might be to expand the label to the latest label applied to the given source file.
The purpose of this feature would be to enable us to automatically update a source module with release information that is based on the label applied in Vault, without having to edit the file each time we release/label our product.
Does this help?
-
- Posts: 55
- Joined: Thu Dec 02, 2004 1:59 pm
I understand the second part of this but not the first (because a Get by Label requires you to specify a label, which wouldn't work so easily in keyword expansion). Perhaps an example would help:Dave Schulte wrote:What we would like to do is to have a "label" keyword expanded to equal the label used when doing a "Get Label". The default behavior when doing a simple "Get" might be to expand the label to the latest label applied to the given source file.
If a source file had a label "Version 1" applied to it, then a "Version 2", a Get on the file with this:
$Label: $
would expand to this:
$Label: Version 2 $
If another label were applied "Version 3", a new Get one then have:
$Label: Version 3 $
This could be done, but it might not have the effect you want, because a Get will only replace the keyword if there has been a new version of the file checked in. If the only thing that has happened is a new label applied to the file, the Get is not designed to catch that (because Get downloads files when a new version is available, and wouldn't know to check the keywords inside the file).
So, to get this to do what you want, you'd need to not use working folders when doing builds, and get fresh copies of the files each time.
-
- Posts: 55
- Joined: Thu Dec 02, 2004 1:59 pm
I figured this would be a problem (in that keywords are only expanded on add or checkin). In this scenario, we would apply the label after we finalize a release, which would result in none of the files associated with the label having the correct keyword expansion.
Yes, this is not what we want. If such a feature were added, it would mean for the "Label" keyword alone we would have to have the keyword expanded at the time a Get, Get from Label, or even Branch from Label, is done.
Never mind. This is probably too much of a change for how Vault currently behaves.
Yes, this is not what we want. If such a feature were added, it would mean for the "Label" keyword alone we would have to have the keyword expanded at the time a Get, Get from Label, or even Branch from Label, is done.
Never mind. This is probably too much of a change for how Vault currently behaves.