Kris
Kris

Reputation: 640

Find number of lines of code changes in TFS Shelveset

Is there a way to find the number of lines of code changes(from the latest version in the server) in a TFS shelveset. I want this for code review purpose to find the total ELOC for a particular shelveset file.

Upvotes: 1

Views: 2668

Answers (1)

Richard
Richard

Reputation: 108975

You can get a diff between two versions with tf diff.

Eg.

tf diff the.file /format:unified /version:c1000~c1001

will show the diff on the specified file between changesets 1000 and 1001, which can be parsed to count changed lines (to whatever definition you want to use such as not counting whitespace only changes).

Note:

  • Multiple formats are available, some might be better for parsing (see help for details).
  • You can use various formats for versions (eg. version in the current workspace and latest): again see help.

Upvotes: 1

Related Questions