#1
|
|||
|
|||
VSS Check-in Issues
Hello,
I'm having some trouble getting the VSS Check-in build step to work correctly. In part of my build, I replace some text in two C# files. I then check them out after I know the build is successful. I immediately check them in with a comment. The strange part is that the check out and check in "seem" to be working correctly. The two files get checked out - I verified this using VSS. When I check in the files, they are no longer checked out in VSS, but it's as if they check out was rolled back to a previous version. There's no history showing that the files were checked in. Has anyone else seen this? Any suggestions? Thanks in advance! Derek |
#2
|
|||
|
|||
You need to checkout the file before modifying it -- the first thing a checkout does is replace the local file to match what's in VSS -- and check it in after the changes have been made.
If the checkout step is performed after modifying the file and it is configured to replace writeable files, it will overwrite your changes; otherwise the step will fail due to a writeable file. And normally, checkin on a file that is identical to what's already in VSS will just undo the checkout and not create another revision. |
#3
|
|||
|
|||
If I'm working independently of Visual Build and using VSS, I can modify a file locally that's not checked out (just have to modify readonly attributes). When I check it out, I just have to specify "don't get local copy" so my changes are not overwritten. Then I can check it in with my changes. Does Visual Build not allow this?
I understand that you always want to check out a file first, but I don't want files left checked out if there is a build failure. I only want to commit the code change after I know that the build succeeded. I've attached the section of the build I'm having trouble with if that helps. Thanks, Derek |
#4
|
|||
|
|||
Try checking the 'Show output but do not get files' checkbox on the Flags tab.
Alternatively, the VStudio.bld sample demonstrates how to handle this by undoing checkout on build failure (in the failure steps) if checkout has completed. |
#5
|
|||
|
|||
> Try checking the 'Show output but do not get files' checkbox on the Flags tab.
This was a great help. I was able to track it down to trying to check in two files from different projects. I split them up into different steps and it worked great. Thanks for all the help! Derek |
#6
|
|||
|
|||
Interesting. I looked at the VStudio.bld sample and looked at the failure steps. It seems the Undo Checkouts are build only if the 'Checkout' action step fails. How can the 'Undo Checkout' be build for when a checkout, project build or any other action step between a checkout and a checkin fails? Meaning, a checkout is successful but before it's checked back in, a failure occurs, so a undo checkout occurs to start again. Would that be a good thing to add to a project?
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|