Conceptual Question about Repos and structuring development workspaces...

Sean schliden at gmail.com
Tue Mar 20 08:55:04 CDT 2007


Hi,

I am new to Mercurial and SCM in general.

I pored over the documentation and mailing list archives, and although
I have picked up plenty of information on the technical aspects, I
still find myself puzzling over the best way to actually use SCM in
practice.

I have two general questions.

1. How do I start using SCM with an existing codebase ?

Being new to SCM, my customer/project/ directories tend to be full of
multiple copies of files.. ie:

 index.php (latest)
 index1.php
 index2.php
 index3.php (oldest)

Ugly stuff, I know, but the question now is, do I do the following:

1. ren index.php index_latest.php
2. ren index3.php index.php
3. hg add index.php
4. hg commit
5. del index.php
etc etc

I will loose the relevance of the file dates (all commits will be
today's date), but at least I will have captured the history of
changes...


2. At what level do I create repo's ?

Alot of my work is web and database. Web code tends to be interpreted,
not compiled, hence not involving makefiles, etc  (This might be
significant to the workspace structure as there is no real build
process.)

I organise by customer, by project:

Do I create a single repo for each customer/project ?
Do the rules change for large collections of files i.e a large intranet ?
Do I exclude binary files ?
How should I break up the code / repos ?

I am a bit worried, that if I jump in making repos here, there and
everywhere, I might come to regret it later.

For instance I have created a repo for the admin subdirectory of one
client website and am already wondering, if I should have just created
an all encompassing repo for the whole site, not one for the admin
code and one for the rest of the site ?

Thanks for any assistance (and patience) in advance.

Sean


More information about the Mercurial mailing list