I am experimenting with Hg with a view to moving away from SVN but wanted some opinions on how I should structure my Hg repository. I come from a SVN background (which may
There are several structural differences between a Subversion (SVN) and Mercurial (HG) repository, or repo for short, implies how you'll "design" your hierarchy:
trunk
/branches
/tags
structure is there to help you to find your "copies" back, no more. On the other side, branches and tags are well defined in mercurial. A tag is really a name that you put on a particular revision, and you can ask for all the existing tags. For branches, you'll see that there are MANY ways to handle them, but the one that fits best to the SVN philosophy, are named branches.With that in mind, and coupling it with you idea of stable, quality assurance (QA), and development (dev) process, here is what I would recommend:
Example: MyProject-1.0
[STABLE Repository, pulls from any/all QA]
- MyProject-1.0
[QA Repositories, branched from STABLE, pulls from any/all DEV ]
- QA_MyProject-001 (Person A)
- QA_MyProject-002 (Person B)
- QA_MyProject-003 (Person C)
...
- QA_MyProject-### (Person #)
[DEV Repositories, branched from STABLE or QA]
- DEV_MyProject-001 (Feature X)
- DEV_MyProject-002 (Feature Y)
- DEV_MyProject-003 (Feature Z)
...
- DEV_MyProject-### (Feature #)
1. DEV completes feature(s)
2. QA pulls feature(s) from DEV
3. STABLE pulls from all approved QA(s) (consolidating all changes)
But before you do that - check this out: hginit.com - it's a ½ hour read, and it has a section for svn-users.
Made me a lot wiser, and I decided on abandoning /trunk /tag structure, and use mercurial in a different manner. I now have a repository for every project, that just contains the structure of the project, and i tag using the mercurial tag command.
.Jesper Hauge
Mercurial is really well documented. You only have to know where to look in the Wiki.
You can look at Mercurial's wiki article RepositoryNaming to find some of your answers.
You should also read the official Mercurial manual: Mercurial: The Definitive Guide
Good luck!