D.6 File History

VSS keeps a log of all of the changes that have been made to a file since it was first added to source control. This history will contain one entry for every time the file was checked in. To see the history of a file, select it in the Solution Explorer and then choose the File Source Control History menu option. This will open the History Options dialog, which is shown in Figure D-5. This allows you to choose which aspects of the file's history will be displayed.

Figure D-5. VSS History dialog

As well as keeping track of changes to a file, VSS also lets you apply labelsthese are additional markers in a file's history that are used to indicate versions of significance. For example, when a software product is released, it is common practice to apply a label to all of the files in a project. This way, all of the source file versions that correspond to the release are easy to identify. (This is important if you need to release a quick bug fix for an old version of a product.)

By default, VSS will show all labels in a file's history, but you can turn this off with the History Options dialog. (Alternatively, you can elect to see nothing but the labels.) The Options dialog also allows you to specify the range of dates in which you are interestedfor aged files, the full history might be so extensive as to be overwhelming, so it is useful to be able to narrow it down a little. The From and To fields in the dialog can contain dates or times, with a D prefix (e.g., D01/01/02;13:15). You can also enter a label in these fields by prefixing them with an L (e.g., LMyLabel). Or they can contain a version range to show. (For example, you could specify From as 5, and To as 10.)

Finally, the User field allows you to restrict the history results to the changes made by a specific user. When you click OK, VS.NET will display the results in the dialog shown in Figure D-6.

Figure D-6. VSS History search results