tags:

views:

66

answers:

2

I'm using Mercurial with TortoiseHg. Each developer has their own repositories, and there's one central repository on the server for synchronizing our changes. (This will sound lame, but we're using it to manage the source for a legacy VB6 project. Nothing we can do about that...)

As has been pointed out elsewhere, there is a big problem in VB6 with merging the .frx (form resources) files. So code changes seem to merge fine, but if two developers both make changes at the same time in the form design view, we can't merge.

I'm ok with disallowing concurrent edits, but of course the whole point of Mercurial is that it's distributed so there is no option to force a file to be locked before editing. I don't believe there's a Mercurial solution for this, so I'm wondering: other developers who are using Mercurial for version control, do you have some 3rd party tool that assists with locking files for editing in the cases where it's necessary? Did we make a mistake using Mercurial instead of something like SVN?

A: 

This is from Bryan O'Sullivan's book on Mercurial:

There is no single revision control tool that is best in all situations. As an example, Subversion is a good choice for working with frequently edited binary files, due to its centralised nature and support for file locking.

anon
Agree. If you have more than occasional need of locking of files in you VCS split your repository and store them in SVN. (I wouldn't switch to SVN for all of the files)
Rickard von Essen
@Rickard Hmm, I've been in the "two VCS" place before, and I would never go there again. I would say choose ONE VCS for your specific project (on whatever grounds are the most important) and stick with it. You can of course use different VCS's for different projects, if your projects are at all properly architected.
anon
@Neil I have not tried this my self, but I read some people recommend it. I guess that should easy for some types of artefacts such as documentation or graphics, for other more or less complicated. When you say you would never go there again it sounds like it was bad. I'm curious, what was your problems, and what was your setup?
Rickard von Essen
@Rickard It was a project where they (I was a contractor) wanted the UNIX files to be under RCS and the Windows files under PVCS, with some (but not all) mixed and matched between. And guess which lucky guy got to write the middleware to make this happen seamlessly? Mercifuly, the project got cancelled for other reasons before I'd got beyond the design stage, but I was always sure that it wouldn't work.
anon
+1  A: 

Heard of some people using a standalone lock-server (this one in particular).

Mr.Cat