1

In my company (as in most) source code modifications are described in so-called "tickets", which have a unique ID for reference purposes. When somebody checks in a file, that ID is entered in the "comment" field.

Recently somebody has checked in a file, but I don't know which one. I do know the ID, so by querying the comments I should be able to find that file.

How can I query the comments of my Visual SourceSafe system?

For your information, I have no problem checking the files/database where SourceSafe keeps its information internally.

Dominique
  • 16,450
  • 15
  • 56
  • 112

1 Answers1

0

Using the command line with ss.exe, there is no built-in way to search comments only (to be sure, I actually went through all relevant commands and commands options).

However, you can combine history command with PowerShell's Find-String:

PS C:\Programs Files\Microsoft Visual SourceSafe>$env:SSDIR = "path\to\srcsafe.ini\dir"
PS C:\Programs Files\Microsoft Visual SourceSafe>.\ss history $/path/to/desired/directory/or/file | Select-String -Pattern yourid -Context 10,1

Notes:

  • Context 10,1 gets you the preceding 10 lines and succeeding 1 line, so that you'll see the matched file details.

  • For more advanced usage utilizing history, see this related question.

  • I guess you can also use external tools, like VssReporter (but I have no experience with that).

OfirD
  • 9,442
  • 5
  • 47
  • 90
  • I just discovered that this command does not show the files, which are currently checked out. Do you know about a parameter which shows those files too? – Dominique Mar 29 '21 at 11:30
  • I'll be able to check this out next week, I'll let you know. – OfirD Mar 29 '21 at 15:41