Subversion expansion tag
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
5 posts
• Page 1 of 1
Subversion expansion tag
by spr » 06 Aug 2013, 01:22
There is a very useful expansion tag I have noticed in the code -
Cheers,
Steve
- Code: Select all
* @version $Id: CardFactoryUtil.java 22806 2013-08-05 18:02:21Z Sloth $
Cheers,
Steve
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Subversion expansion tag
by spr » 06 Aug 2013, 18:11
Nope. Tried "$Id:" and "$Id:$". Remains resolutely unexpanded.friarsol wrote:I believe it's $Id:

Cheers,
Steve
Re: Subversion expansion tag
by friarsol » 06 Aug 2013, 18:26
It only expands when you commit, and you need to make sure the files have their svn:keywords set appropriately for that file.spr wrote:Nope. Tried "$Id:" and "$Id:$". Remains resolutely unexpanded.friarsol wrote:I believe it's $Id:![]()
http://svnbook.red-bean.com/en/1.4/svn. ... words.html
You do need the ending $ as well.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Subversion expansion tag
by spr » 06 Aug 2013, 18:44
Thanks for the link. I just assumed it would be some server setting but it looks like I will need to run the following for each file I want substitution to take place in. I will give it a go next time I commit.
EDIT: and for this to work <filename>.java must have been checked into subversion at least once. It will fail if the file does not yet exist in subversion.
EDIT: and it works! Finally!
EDIT: just to confirm the tag is "$Id:$".
Cheers,
Steve
- Code: Select all
svn propset svn:keywords "Id" <filename>.java
EDIT: and for this to work <filename>.java must have been checked into subversion at least once. It will fail if the file does not yet exist in subversion.
EDIT: and it works! Finally!

EDIT: just to confirm the tag is "$Id:$".
Cheers,
Steve
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 25 guests