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 开发者_JAVA技巧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.
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.
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.
精彩评论