How should I setup my Visual Studio projects/solutions in a Mercurial repository?

Posted by Dave A on Stack Overflow See other posts from Stack Overflow or by Dave A
Published on 2010-05-21T23:38:21Z Indexed on 2010/05/21 23:40 UTC
Read the original article Hit count: 380

Filed under:
|
|

At my company we have a few different web apps that each share some common libraries. The Visual Studio setup looks like this.

Website 1 Solution
  Website 1
  Shared Library 1 Project
  Shared Library 2 Project

Website 2 Solution
  Website 2
  Shared Library 1 Project
  Shared Library 2 Project

Windows Service Solution
  Windows Service Project
  Shared Library 1 Project
  Shared Library 2 Project

Shared Library Solution
  Shared Library 1 Project
  Shared Library 2 Project

All Projects Solution
  Website 1
  Website 2
  Windows Service Project
  Shared Library 1 Project
  Shared Library 2 Project

We want to start using Mercurial for source control, but I'm still not sure the best way to do it.

From what I've read you're supposed to use a separate repository for each project. No problem there, but where do the Visual Studio solution files (.sln) go? Should there be a separate repository with just an .sln file?

Ideally the projects that use the shared libraries should all use the same version, and the solution "All Projects Solution" should build without errors, but sometimes we need to branch the shared libraries. What is the best way to do this, and how would the repositories be setup?

How do I get a working copy of a certain branch/tag of the Website 1 solution when every project is in a separate repository. Do I have to pull each one separately, or write a script to do it all at once? Can tortoise hg do that for me?

Any other tips to make this process easier?

© Stack Overflow or respective owner

Related posts about hg

Related posts about mercurial