views:

105

answers:

3

Hello

After reading Joel's last article on Mercurial, I'm giving it a shot on XP as a single-user, single-computer source control system.

One thing I'd like to check, though, is: It'd be easier to just create a repository of all the tiny projects I keep in eg. C:\VB.Net\, but the result is that the changes I make to the different projects therein (C:\VB.Net\ProjectA\, C:\VB.Net\ProjectB\, etc.) will be mixed in a single changelog.

But if I use a single repository for all projects, when I do diff's or go through the change history, will I be able to filter data so that I only see changes pertaining to a given project? Otherwise, is creating repositories in each project directory the only solution?

Thank you.

+5  A: 

I'd keep one repository for each single project. The overhead is minimal (just one hg init for each source code directory, or one right-click in Explorer), and you won't get confused. After all, why should a change to one program affect the version history of a completely unrelated one?

Of course, you can see the history of each file in the Repository Explorer, but I think it goes against the very concept of version control to mix unrelated stuff into one repository.

Tim Pietzcker
Thanks guys. So I'll just go ahead and create a repo in each project sub-dir.
OverTheRainbow
+3  A: 

The right granularity for a DVCS (i.e. a repo where all the history can be cloned) is the project.

If you have several projects which have different development lifecycle (i.e. a change in one does not always affect the other), they should be in their own repo.

VonC
A: 

In case somebody uses bitbucket, they allow a only one private repository, so you can put all your projects in there if you want them to be private. I would like to hear comments about this scenario.

raticulin