Click here to Skip to main content
12,747,151 members (27,956 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

24.1K views
2 bookmarked
Posted 9 Feb 2010

Team Foundation Server (TFS) Build Comments Finder

, 17 Feb 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
This utility is used to find the comments entered by users in TFS while check in the code. This will give change set number with owner, date of check in, comments and check in notes.So this will used in finding all checkin comments from TFS for any project. //Create object of tfs...
This utility is used to find the comments entered by users in TFS while check in the code.

This will give change set number with owner, date of check in, comments and check in notes.

So this will used in finding all checkin comments from TFS for any project.
 //Create object of tfs
 //Need to add server address, user ID, password and domain Name
 TeamFoundationServer tfs = new TeamFoundationServer("<ServerAddress>",
    new NetworkCredential("<UserID>","<Password>", "<DomainName>"));
 // Get a reference to Version Control.                       
 Type type = typeof(VersionControlServer);
 VersionControlServer versionControl = (VersionControlServer)tfs.GetService(type);
 //Need to add application path
 IEnumerable changeSets = versionControl.QueryHistory(@"<ApplicationPath>",
     VersionSpec.Latest, 0, RecursionType.Full, 
     null, null, null, 5000, true, false);           
                      
 int i =-1;
 foreach(Changeset data in changeSets)
 { 
     i++;
     this.dgvComment.Rows.Add();
     this.dgvComment.Rows[i].Cells["ChangeSetNo"].Value = data.ChangesetId.ToString();
     this.dgvComment.Rows[i].Cells["Owner"].Value = data.Owner; 
     this.dgvComment.Rows[i].Cells["Date"].Value = data.CreationDate.Date;
     this.dgvComment.Rows[i].Cells["Comments"].Value = data.Comment;
     this.dgvComment.Rows[i].Cells["CheckinNote"].Value = data.CheckinNote;              
 }

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170215.1 | Last Updated 17 Feb 2010
Article Copyright 2010 by shirish.lokhande@gmail.com
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid