Click here to Skip to main content
12,063,909 members (63,686 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

23.4K views
2 bookmarked
Posted

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...

Comments and Discussions

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