Automate Checkin Comments into Code

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
rajofchennai
Posts: 2
Joined: Tue Nov 15, 2005 9:19 am
Location: Baltimore, MD

Automate Checkin Comments into Code

Post by rajofchennai » Tue Nov 15, 2005 9:49 am

Hi,
I'm new here. I checked the documentation but could not find it.
I'm looking for a functionality or plugin that would add the version number and checkin comments into the code Automatically.
E.g.,
When User1 checks in the code MyCode.cs into the valut with comments "Bug 1 has been fixed", the comment

/*********
*Version 1.2 by User1 - Bug 1 has been fixed*
**********/
using system;
......

should be added automatically to the code.

Does any one know if this could be done as an automated process ....?
If so can you please tell me how.

Any help or comment would be greatly appreciated.
Thanks,
Raj.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Nov 15, 2005 10:13 am

You're referring Keyword Expansion, which Vault supports.

To configure keyword expansion in Vault, see Admin Tool Help:
http://download.sourcegear.com/misc/vau ... efault.htm

Details are in Admin Tool->Repository Options->Enable Keyword Expansion.

I think the keyword you want to use for comments, etc. is $Log
Linda Bauer
SourceGear
Technical Support Manager

rajofchennai
Posts: 2
Joined: Tue Nov 15, 2005 9:19 am
Location: Baltimore, MD

Thanks

Post by rajofchennai » Tue Nov 15, 2005 11:32 am

Linda,
Thanks a lot for your help n time.
U have a good one...
~Raj.

agorup

Tried it, didn't work

Post by agorup » Wed Nov 16, 2005 1:02 pm

I tried doing just that , but it didn't work. I enabled keyword expansion in the admin tool and put in $Author: $ and $History: $ and
$Log: $ but nothing expanded in the Vault. Didn't expand when I retrieved it, either.

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Wed Nov 16, 2005 1:36 pm

I think it gets expanded at checkin. So keywords in files already in Vault will not be expanded until they are modified and checked in AFTER keyword expansion has been enabled for files of that type.

Mike

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Nov 16, 2005 1:58 pm

Mike is correct.

Keyword Expansion is not executed until the file is committed. In the file you mentioned, make a change, and then commit the change to the repository.

If you view the file in the repository (or get it), it will now have the expanded information.
Jeff Clausius
SourceGear

Post Reply