views:

619

answers:

6

I'm using Visual Studio 6.0 and Visual Basic 6.0.

I have them integrated but when I check out a Project and then try to edit a module in that project it's locked and I have to manually right-click on it and do a Check Out to unlock it.

I thought there was a way to have VSS automatically check out the file for editing.

Any suggestions?

A: 

I never figured out a way to do this. It was always a huge pain. Sorry for posting a negative answer, but I figured that you might want to know that you aren't alone in hating this, but that there wasn't an immediate and obvious answer. I'll be following this question along with you in case someone out there does know of a solution...

Matt Dawdy
A: 

I don't think it is possible to do this (at least it wasn't when we used VSS eight years ago), but while you are experiencing the pain of a check out styled source control, run - don't walk, to some real, non-locking style source control solution. SVN, CVS, Git, Mecruial, anything that doesn't lock files, and doesn't leave your source in a proprietary file sytem. We switched to CVS eight years ago because we lost all of our source history (the code was checkout out so it was retrievable), due to a VSS glitch. Best thing we ever did, made collaboration ten times easier. Now CVS isn't the best solution (it was the most reasonable solution for windows back then), but anything is better than VSS.

Kris Erickson
+1  A: 

I agree with kris here. Now I know that a bunch of folks saying your "software stinks" doesn't really answer your question. But there is a world of difference between a check out style source control and a file locking system like Source safe. The general consensus is that Check out systems are far superior.

With check out, what you do is you check out the project from your repository. All the files are editable. You work on your project as normally. Then before you checkin you do another update. If anybody else in your team did a update the software will automatically merge in the changes into your code. You will have a chance to review the merges and resolve any conflicts. After the update you can then check in your changes which everyone else can retrieve.

The big scary part is the merging part. Back when CVS and subversion where just command line tools it was a little scary as it was a pain to retrieve what happened with the merging. But with today's tools like Tortoise is all visual. In the last couple of years I can't think of any instance where a automatic merge failed. Any conflicts (basically two people edit the same line of code) are display right here for you to resolve.

Subversion

Tortoise SVN

RS Conley
With Vb6 merge conflicts are unavoidably. That is because *.frx files are binary and not merge friendly. Even the plaintext *.frm have "pointers" into the .frx file, which change unpredictably.
dummy
True that is a problem. Practically I found that modifications that causes changes to the frx file to be few, I can see types of applications where that could be problem.
RS Conley
Will these other Source Control systems integrate with the VB 6 IDE?If we use one of the above we'd still have to tell it to check them back in, right? So, we'd be back to the same problem: could we have VB6 automatically check those files back *in* ?
Clay Nichols
Tortoise integrates with Windows Explorer which works nearly just as well. There may be a VB6 add on that work with Subversion but I am not aware of it. My personal setup is dual monitors with the IDE run in SDI Mode.
RS Conley
I have Windows Explorer opened to the Project Root Directory and alt tab after I save everything and want to check in.
RS Conley
The check-in check-out paradigm of subversion means that you don't have to go to source control software as often.
RS Conley
A: 

Best solution I found was to check out all the files. Took a bit of poking around to figure out how to do that. Here's how: http://stackoverflow.com/questions/176822/how-to-check-out-all-vb6-project-files-from-vss#176824

Clay Nichols
A: 

when I check out a Project and then try to edit a module in that project it's locked and I have to manually right-click on it and do a Check Out to unlock it

Like it or not, it works that way by design i.e. you can check out all the files but you have to explicitly choose to do so, rather than being the default option. I guess that's because checking out all modules (class modules, forms, usercontrols, etc) locks out all other users from the entire project, which is normally undesirable in a team collaboration environment.

onedaywhen
A: 

There is an option in SourceSafe under the "Local Files" tab labeled "Use read-only flag for files that are not checked out". By default this option is selected, but if you unselect it, you will be able to edit any file in the project without checking it out.

Once you uncheck the option, you can get the latest version of a project to remove the read-only flag from all the files.

When you check out a file, you will be warned that there is a writable copy of the file in your working folder, at which time you can replace it with the version in the SourceSafe database.