Adding SVN keyword expansion in Tortoise SVN
When using Tortoise SVN client to access my Subversion repositories from Windows, I tend to forget to set up keyword expansion (unlike in the Linux command-line, where one can always invoke svn propset svn:keywords "Id Date Author" somefile).
In Tortoise, this can be done by enabling auto-props in the configuration. In Windows Explorer, right-click to get to the Tortoise context menu:

(Yes, I'm a bit O.C. so even my resume is under version control. :P)
Edit the Subversion configuration file, specifically the following properties:
[miscellany]
...
enable-auto-props = yes
...
[auto-props]
*.txt = svn:keywords=Date Id Rev Author URL;svn:eol-style=native
*.html = svn:keywords=Date Id Rev Author URLThis tells Tortoise to expand the keywords specified for the given files. Note that this works only on new files added to the repo after the configuration has been modified.
I couldn't get this to work but I'm sure the problem is me. In my svn config file I set "*.c = svn:keywords=Rev"
ReplyDeleteIn one of my .c files I added $Rev$ on one of my commented out lines. When I commit the new file, I don't see the keyword expansion. The effect I was going for was the "svn propset svn:keywords "Rev" file.c". I couldn't figure out how to do this with the tortoise command line "TortoiseProc.exe /command:propset ???" I didn't know how to fill in ??? so I tried the other way. Do you have any advice on getting either way to work.
Haven't tried it on the command line, but something like
ReplyDeleteTortoiseProc.exe /command:propset svn:keywords 'Rev' file.c
should work, similar to the `svn' command. Let me know how it goes.