• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 629
  • Last Modified:

How to maintain version history in the same file in team foundation server 2008

Hi Experts,

How to maintain version history in the same file in tfs 2008?

Our requirement is to maintain version history / updated date information inside the checkin files (database .sql files) This will help us to track the post deployment issues with respect to database.

This is something similar to Keyword expansion feature in Visual Source Safe. I have seen some articles in google which says, keyword explansion support has been removed in TFS 2008.

Without this feature, i am facing lot of problems in my current project.

But is there any workaround to achieve this?

i have so many hopes in experts exchange EXPERTS

Any kind of hlep is highly appreciable.
0
arvapal
Asked:
arvapal
2 Solutions
 
dportasCommented:
Perhaps it's possible using a little PowerShell magic. Some examples that may help:
http://blogs.msdn.com/jmanning/archive/2006/09/28/776141.aspx
0
 
arvapalAuthor Commented:
Hi,

I have gone through that link, but not exactly the same.

Below is my exact requirement.

I have the database scipts at production, Staging and Testing environment.

Currently, i don't have any version control for the db scripts. Due to that problem, for any issues with respect to the database scripts, i am unable to track the version of that script which  is running at Production or Staging server.

To address that problem, i have to maintain the version history on the top of the script file itself.

So any additional information would be greatly appreciated.
0
 
Bob LearnedCommented:
Yes, you are joining a very large "club" of people that are complaining about that same fact.

Have you seen this blog from Buck Hodges?

Keyword expansion in TFS
http://blogs.msdn.com/buckh/comments/3748765.aspx
0
 
TheSaturn49Commented:
I'd suggest checking the .sql files into TFS, if you aren't already.  

Then, write a web service that listens for checkins, then re-downloads and checks out the .sql file(s) affected and appends the top of the file with the changeset/date/comment, etc and checks it back in automatically.  

You'd have to be careful that the web service doesn't pick up its own checkins causing an infinite loop of checkins.  This is easily done by having the web service write a specific comment when checking in its change and looking for that comment when acting on checkins.  

It would also result in two checkins for every checked in change (one from the user and one from the web service,) which could cause problems with continuous integration and makes your history look a bit messy.

In fact, TFS 2005 didn't have continuous integration (CI), so the web service here that added CI to TFS 2005 is a decent place to start to figure out how to subscribe to checkin events and act on them:

http://blogs.msdn.com/khushboo/archive/2006/01/04/509122.aspx
0
 
TheSaturn49Commented:
This question has been answered.  TheLearnedOne provided proof that the feature has been removed in TFS 2008 and I provided a workaround.  There's also other suggestions for workarounds listed in TheLearnedOne's link.  While the workarounds are not simple and I did not provide sample code, I think it deserves a C or B - the question was answered.

0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now