8

Currently I'm using Source Safe with a legacy VB6 application and I've noticed countless times where the application is not updating the files correctly using the get latest version, or adding new files to a project. I just figure someone has to have a better way of using version control with VB6 applications.

sleath
  • 871
  • 1
  • 13
  • 42
  • 3
    We have been using VSS in a de-attached form i.e. We get latest or check-in manually from VSS instead of IDE. Btw, there are other better options than VSS – mqpasta Jun 16 '11 at 13:39
  • If you guys have anything else it's very painful. – sleath Jun 16 '11 at 15:25

5 Answers5

11

Use something else - anything else. The three more popular free/open source solutions are git, mercurial, and svn. I doubt that git and mercurial integrate into VB6 but SVN does have an integration solution - you can find it here: http://svnvb6.tigris.org/

For what it's worth, I have gotten used to not having source code control integrated into my IDE, so integration wouldn't even be a factor in my decision if I were choosing a new solution.

jlnorsworthy
  • 3,914
  • 28
  • 34
  • 1
    +1 there's also useful info in the question on [using SVN with VB6](http://stackoverflow.com/questions/24680/using-subversion-with-visual-basic-6-0). Remember that some [VB6 source files are binary](http://stackoverflow.com/questions/322488/how-do-you-deal-with-visual-basic-6-frm-and-frx-files-in-source-control) so be careful about systems that rely heavily on merging, like git and mercurial. They'll [struggle](http://stackoverflow.com/questions/2462480/using-git-with-vb6). – MarkJ Jun 17 '11 at 08:18
  • 2
    +1 on MarkJ's comment. Binary files with mercurial anyway, are just about not workable. WAY too much of a pain. SVN or TFS has a locking metaphor, which you really need with any kind of binary file that can't be merged. I also second the motion to just not use the SCC integration with VB6. It bites. Just open your source control app as a seperate app and use it side by side with the ide. Doesn't take much to get used to it. – DarinH Jun 17 '11 at 14:49
  • @jnorsworthy is steering you correctly, and I have to agree with @MarkJ that svn may be the best path for the reasons he mentioned. I've had good luck using [vss2svn](http://www.pumacode.org/projects/vss2svn) to migrate VSS projects to SVN. Be sure to run the vss analyze tool prior to migration (nearly 0% of there being no inconsistencies or corruption). – thekbb Jun 17 '11 at 14:55
  • We use Mercurial and the FRX changes are very rarely a problem in practice. We can coordinate around the occasions when two people (or two branches) actually touch an FRX. – StayOnTarget Jan 10 '19 at 00:48
3

I've been using Mercurial with a combination VB6/.NET application for about a year. It works. I encountered the following problems on the VB6 side, but they're not deal-breakers:

  1. If you have "resources" on a form like an image, it embeds those in a parallel .frx file next to the .frm file, and these .frx files can't be merged if you and a co-worker both make changes at the same time. Source control that offers locking on specific file types would work better for this. What we had to do was either (a) live with the few cases where it happened or (b) use some kind of manual locking procedure: "I'm editing frmMain... nobody else touch it!"

  2. The VB6 IDE has some nasty problems with trying to auto-correct the case of your identifiers, and it doesn't do a good job. Therefore Mercurial is forever seeing changes in a file where all that really changed was the case of a variable name. The worst part is that the IDE treats Enum values as global variables, so it will take the case of your Enum values and apply that to all variables with the same name in your code.

Scott Whitlock
  • 13,739
  • 7
  • 65
  • 114
  • The second one seems to a problem in all kinds of VB. We experienced the same issue at work (we have a lot of VBA and some VB.NET code), and it sucks big time! The ideal solution would be to allow only lower-case variables, but we started the project years before starting to use source control, so we had no idea that we would have these problems some day ... – Christian Specht Jan 10 '13 at 21:50
2

I would give SourceGear Vault a shot. They have VB6 integration and it works pretty darn well. Plus it is free for 2 users.

I've tried SVN, but like @MarkJ says, it'll struggle - SVN relies too much on merging. You'll have to mark .frx files to be exclusively checked out, which then might put them out of sync with .frm files, which will force you place .from files to be exclusively checked out and at that point you might as well make exclusive checkouts the default, which kind of defeats SVN's main strength.

AngryHacker
  • 59,598
  • 102
  • 325
  • 594
  • I've ended up going with the SourceGear solution just because it fit my environment better. Very easy to use. We'll see how it holds up. – sleath Jun 22 '11 at 15:07
1

We switched from using StarTeam to use Team Foundation Server which actually integrates really well with the VB6 IDE using the MSSCCI Provider

Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
0

In VSS explorer try settings Tools | Options tab Local Files setting Compare files by to Contents. This might slow VSS operations a bit.

wqw
  • 11,771
  • 1
  • 33
  • 41