1

I am trying to get some information out of TFS. Specifically, for a given user, I would like to get a listing of all changesets with their date and all changed items (bonus points for inline diff). This listing will be used to run a diff for all modified files.

Something along the lines of:

tf history /user:USERNAME
// pump changeset number into
tf changeset 'changeset number'
// now get the items, and pump into
tf diff 'item' /version:C122~C123

I believe I could use TFS Reporting for this, but I do not have access permission to the reporting server :(

I could run this in C# with some regex, but I'll rather avoid that.

Thanks :)

leppie
  • 115,091
  • 17
  • 196
  • 297

1 Answers1

1

for /f "tokens=1" %f in ('tf history /user:username . /recursive /noprompt') do for /f "tokens=2" %g in ('tf changeset %f') do tf diff /noprompt /version:C%f %g

You may want to break it up to cut the rubbish from tf history and & tf changeset out

such as : | findstr /R [0-9]. to get only the changeset number from tf history

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216