Keyword expansion customization

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

Moderator: SourceGear

Post Reply
marioavc
Posts: 8
Joined: Thu Feb 16, 2006 1:01 pm

Keyword expansion customization

Post by marioavc » Tue Feb 28, 2006 1:37 pm

Hi, I would like to know if there is some way to add custom keywords when checking in, because I am guessing the ones I need are not implemented.

For example, one way we would like to insert comments in the code is:

// ****************************************
//
$JustDate:$ -- $Author:$: (ver $Label:$.$Revision:$)
// Description:
$Comment:$
// ****************************************


But, two main problems arise from this:

1) There are no such keywords as $Label:$ and $Comment:$. Moreover, if you are going to always use this header, maybe you could define a new keyword, say $MyHeader:$ which is defined as the previous and reducing this way what the coder needs to type. Yeah sure, you can always use the built-in $History:$ or $Log:$ keywords (both of them include the checkin comments), but they are not in the desired format/order/appearance and do not allow more sophisticated uses of the expansion feature. What leads me to the second point...

2) There is no way to custom-format the prebuilt keywords such as $Log:$ and $History:$. If providing a way to create personalized keywords is too complex, at least there should be a way to customize the existing ones, to better suit our needs.

Another thought here would be to code a sort-of-plugin (middleware) which catches the checkin process and does a custom keyword replace before going to the server, and then make the appropiate calls to the API to put it in the rep. I don't know if that kind of integration is possible and to be transparent enough for the developer coding inside the IDE, who just wants to do checkins and checkouts, by the way.

What do you think guys? am I taking a bad approach here? is there some thing out and I am just blind folded?

Mario Vasquez

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

Post by lbauer » Tue Feb 28, 2006 2:40 pm

Vault keywords are identical to SourceSafe keywords, except for the addition of UTCDate and UTCModtime. This makes an easier transition for SourceSafe users. But we might consider adding additional keywords, if enough users expressed interest. There's a feature request logged for additional keywords; I'll add your "vote."
Linda Bauer
SourceGear
Technical Support Manager

Post Reply