index > Team Foundation Server - General > Custom check-in policy

Custom check-in policy


Hi all,

I'm currently investigating custom check-in policies. I've got the basic structure of one up and running. So far so good.

What I would like to do is check the item that is being checked-in to see if it conforms to certain internal coding standards. To do that I need to look inside the file itself - I will then probably use XQuery to look at the contents of it.

Anyway, my question is, how can I actually take a look inside the item? The pendingChange object provides useful information such as the name of the file being checked-in, but it doesn't contain the path of the file. If it did then I could probably instantiate it as an XML document.

Any pointers would be very much welcomed.

-Jamie




http://blogs.conchango.com/jamiethomson
Jamie Thomson

Found a great resource here: http://blogs.msdn.com/jimpresto/archive/2005/01/05/347074.aspx that gave me the main part of the answer. pendingChange.LocalItem gives me the path of the file. Simple really!

Now I just need to instantiate it as an XML document. I'm no C# expert hence I'm winging this a bit. So, if anyone has some advice on how to do that it would be most welcomed.

Thanks

-Jamie




http://blogs.conchango.com/jamiethomson
Jamie Thomson

Hey jamie,

You can check out the MSDN help page on XmlDocument. http://msdn2.microsoft.com/en-us/library/system.xml.xmldocument.aspx

If you run into problems, you can contact the XML folks for .Net: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=38&SiteID=1

mauli

Mauli Shah - MSFT

Thank you Mauli. Much appreciated.

-Jamie




http://blogs.conchango.com/jamiethomson
Jamie Thomson
reply 4

You can use google to search for other answers

 

More Articles

Exams
How to view labels for a file in Team Foundation?
Team Foundation
Source Control Settings
Error upon project creation - VSTS Release / Beta 3 Refresh
mixed VSS/TFS source control deployment?
Upload Template Error and Visual Studio 2005 Team System Extensib...
Source Control and Workgroup Edition
Team Foundation Client for VS 2005 Release Version
Source Control multiple file move, merge, branch ... not availabl...
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Need means to automatically set one work…
Visual Source Safe Installation Problem
BUG: Invalid handle on concurrent checko…
Exporting "Requirement list Documen…
DeleteTeamProject change message
No access to reports and documents over …
Team Build (with TFS RC): Missing Micros…
Bug with Remote connections to Team Foun…
Possible bug: TeamBuild refers to incorr…
Test Director Defect Mapping to VSTS Wor…
Is Active Directory required for Dual-Se…
Passing UserName/Password on Command lin…
Installing Team Foundation Server and Te…
automatic Team build
Send Bug in Mail?

Hot Articles

"Currituck WITs" failure whils…
WorkspaceMapping.xml problem in RC
Please Post all Thirdparty plugins for T…
WorkItemChanged event handler throws exc…
Bug: DropDown FieldControl (Team Explore…
Notification receiving problem
"Assigned to" field in the wor…
Connecting TFS Project on a Different Do…
Caching Problems
Steps for customize reports
Irreversible decisions?
Setting up Alerts
Assigning a task to more than one user
Team Explorer right click confusing opti…
How to clean TSF install

Recommend Articles

check in-out without Source Control perm…
Hot spare app tier
Possible bug: TeamBuild refers to incorr…
TFS RTM installation bits.
Name instead of UserID in Assign To drop…
Team Foundation Server for Developers Qu…
Team Foundation Server Access over Proxy
Can you upgrade from the demo version to…
TFS Install - Quad 1.8GHZ Xeon... Not Go…
"Remaining work" is not refres…
migrate code analysis policy settings to…
Project creation problem TFS Beta 3
Team Build - PublishRun Error
"TFS WorkItem Tracking" servic…
Integration with Jbuilder