views:

28

answers:

2

How can I easily add 'last modified date' comment to my source files in Visual Studio 2008, so that I don't have to manually update the comment every time I edit the file?

+2  A: 

Use a revision control system that supports the RCS $Date$ keyword, such as RCS, CVS, or SVN.

Instructions for doing that in Subversion are here.

Warren Young
Woah! That is super cool, thank you.
HeavyWave
Unfortunately, if you're using TFS as your source control it doesn't support keyword expansion like this. There is an opensource check-in policy that allows it, but I've never used it. http://logsubstpol.codeplex.com/.
Scott Dorman
+1  A: 

If you are using source control then the last modified date can be obtained from the date of the last check in.

If you're working on your own projects then you still should use source control and as you're not affecting anyone else you can check in incomplete code.

If you're working on a project with others you can still do this if you create individual branches and have a suitable merge schedule and procedure in place.

ChrisF