views:

20

answers:

2

I've got this SQL script that needs to exist in two places in source control. I want to have only one real copy of this file and keep a virtual copy of the file in the other solution. One is needed for a unit test and the other for a development tool. The files, should, by definition, always be the same. If they have differences then there's a problem with our process.

In Sourcegear I could make a virtual copy of a specific version of a file and keep it somewhere else in the source tree. That doesn't seem to be possible in TFS. Is it possible in SVN?

So what are my options here? Branching/merging -- which is what the TFS team says I should be doing here -- means just another step that I have to remember to do. Plus it isn't automatic and I would prefer that this be automated. Is there some way to run an exe on checkin of a specific file? I'm thinking if I could do that then I could do a checkout-edit-checkin of the downstream copy of the file.

A: 

Why not get get the real file prior to testing? Branching is where the file diverges. If its always going to be the same can you not just get the real file?

You can automate checkout, branching, and checkin easily. Just use the TF command line from the VS command prompt.

Preet Sangha
It's a valid solution. I was hoping for something a little more elegant, a la a list of files and their downstream locations that would get processed on checkin.
jcollum
Do you really want alternative histories?
Preet Sangha
No, I really don't. I'd rather that there was a file and a ghost copy of the same file. But TFS won't do that, so I need to find a viable alternative.
jcollum
A: 

My conclusion was that, if there's a way to do this, it's too much work. I solved my issue by moving some files out of the solution (where I wanted to downstream-copy them from) to a new location where they could be shared by both projects.

jcollum