Near the end

Well there are only two weeks left according to the GSoC timeline. That means its time to hunker down and start testing on a production server and write some documentation. Thats what I started doing on the end of this week. Most of the week though was spent using the TFS API to try and extract additional info from the server. For example I was able to extract the number of lines added, changed, and deleted for a revision compared to its previous revision. The result can be given in a variety of different formats but all of them are plain text (not objects or datatypes) which I think is pretty silly. Therefore I choose for the API to deliver the goods in unix normal format and wrote a small parser to identify the valuable info. Its pretty bad but according to the Hackystat commit datatype, having the number of lines added and deleted is required so I put it in.

I also figured out how to use the API to trigger certain events such as builds and commits. I later found out its pretty much usless for testing though since its near impossible to test an asynchronous item with synchrnous unit tests. For example if I commit a “test” item to the repository how long do I wait for a response back, what if it never comes, is it even possible to wait for a response in a unit test environment.

Though learning how the API functions was not in vain. Most of the code and knowledge I learned was used for imporving upon previous features that I had been doing in a sort of round about way. For example, I was using the BisSubscribe.exe tool to subscribe to VSTFS events. This has bad idea written all over it but I didn’t want to mess directly with the pre-created tables in the VSTFS MSSQL server directly in fear that I may cause some horrendous error, not to mention all the security issues. Luckily while learning the API I found there was a class that was used for just this purpose. Since my code is pretty modular I simply wrote another method which used this service and then gave the user the option of selecting between subscribing using the eventing service API or the BisSubscribe. I think its a good compromise.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: