LOL—So I'm Googling about a problem and I find someone else with the exact same problem—only after clicking, I realize that "someone" was ME 10 months earlier. I digress.
I'm still having this problem (obviously) and I'm still using the workaround below, but it annoys me and seems like I'm just missing something simple. Any takers now—10 months later?
Using Vault 2.0.1, if I extract a new file (that's not in my project) to disk, and then go into my project and Show/Hide all files (refresh from disk), I can see that the new file isn't in my project (grey'd out). Since my project file itself is not read-only, I should just be able to right-click on the file in question and "Include in Project." That does work and VS makes the appropriate modifications to the project file. The problem is that somewhere along the way the file I'm "including" gets checked out (and I didn't ask for that to happen).
Is there a setting for this because it doesn't seem like that should happen. I can work around it by undoing the check-out and reverting the file back, but it's hokey! =)
"Include in Project" (from VS) causes checkout
Moderator: SourceGear
Re: "Include in Project" (from VS) causes checkout
Correction...upon further investigation (I must have missed this because I'm so used to my "work around" that I haven't watched so closely), it would seem that Visual Studio puts the checkmark next to the file (like it does for files that are checked out). It is not checked out, though, but there is still a Vault problem. Vault has the file(s) marked as "Renegade" when they are not.
My work around still does solve the problem (both problems: the checkmark in Visual Studio and the "Renegade" status in Vault), but I still believe I'm just missing a setting or something. TIA
My work around still does solve the problem (both problems: the checkmark in Visual Studio and the "Renegade" status in Vault), but I still believe I'm just missing a setting or something. TIA
Hmm. I'm not quite following the steps here - can you be more detailed on the steps you are following that cause the problem? Also, is this VS 2003?
One thing to note about the IDE is that sometimes it puts checkmarks next to files simply because they are read-write, even though they really are not checked out. Vault doesn't really control whether VS puts checkmarks next to the file.
If the file is renegade in Vault, it means that someone or some program saved the file after it was retrieved from Vault (and it is not currently checked out). The file may not have changed, but it will be marked renegade if the datetime is different. You might try to figure out at what point the file goes renegade to track this down further.
One thing to note about the IDE is that sometimes it puts checkmarks next to files simply because they are read-write, even though they really are not checked out. Vault doesn't really control whether VS puts checkmarks next to the file.
If the file is renegade in Vault, it means that someone or some program saved the file after it was retrieved from Vault (and it is not currently checked out). The file may not have changed, but it will be marked renegade if the datetime is different. You might try to figure out at what point the file goes renegade to track this down further.
For our deployments, I have developers list files and versions to deploy, so let's say their deploy list is:
This tells me that I need to get v13 of file1 which is just an update. So I go into Vault and right-click on the history and get v13. No problem.
For file2, however, after I retrieve v1 of the two files to disk, I have to "include" them in the project (the developers mark "new" files this way so the builder knows something else has to happen because we can't just get the project file itself and let VS do the work because it would likely contain OTHER developers additions/deletions that may not have been tested yet).
So I have the correct versions of file2 on disk, but my build project doesn't know about them yet, so in Visual Studio 2003, I click the Show All Files button twice (which unshows and then rescans the disk to find any files that are there now). It will now show me file2, but in a dimmed way--because it's still not *in* the project. I right-click on the file and choose "Include in Project."
Now, this is where it does something I do not expect. I expect that it should just modify the project file and make the appropriate XML additions to tell the project file that there are new files it should include the next time it's rebuilt. And it does do that, but it also seems to mark the files renegade in Vault (maybe this is because it auto-fetched it at the same time as it did the include, but I'm not sure). And then finally, Visual Studio puts a checkmark next to the file. I'm not sure why because it's not checked out.
Make sense?
Code: Select all
/file1.aspx.cs v12, 13
/file2.aspx v1 (include)
/file2.aspx.cs v1 (include)
For file2, however, after I retrieve v1 of the two files to disk, I have to "include" them in the project (the developers mark "new" files this way so the builder knows something else has to happen because we can't just get the project file itself and let VS do the work because it would likely contain OTHER developers additions/deletions that may not have been tested yet).
So I have the correct versions of file2 on disk, but my build project doesn't know about them yet, so in Visual Studio 2003, I click the Show All Files button twice (which unshows and then rescans the disk to find any files that are there now). It will now show me file2, but in a dimmed way--because it's still not *in* the project. I right-click on the file and choose "Include in Project."
Now, this is where it does something I do not expect. I expect that it should just modify the project file and make the appropriate XML additions to tell the project file that there are new files it should include the next time it's rebuilt. And it does do that, but it also seems to mark the files renegade in Vault (maybe this is because it auto-fetched it at the same time as it did the include, but I'm not sure). And then finally, Visual Studio puts a checkmark next to the file. I'm not sure why because it's not checked out.
Make sense?
Do you get the same results if you invoke Add To Source Control and add the file that way? It looks like VS is trying to automatically add the file. Usually when adding new files, it checks out the project file first, and then you have to invoke the checkin command to actually add the file Vault. By all rights, the file shouldn't even exist in Vault yet, but it might be a different code path the way you are invoking it.
But again, a file is marked checked out in VS if it is read-write, and it is renegade if it got modified since the last time there was a Get, so tracking it down that way may reveal something.
But again, a file is marked checked out in VS if it is read-write, and it is renegade if it got modified since the last time there was a Get, so tracking it down that way may reveal something.