I’m a first time user of a version control system.
as a single developer I decided to try version control using mercurial on the same mac ( OS X)
Now after tonnes of reading on the net I still do not know exactly where I should create repositories.
I have several projects and want to put them under version control.
My question is: should I create a repository in ever projects folder where my source resides, or can I have a repository area for all my projects.
What is the right way to do this ?
Right. I don’t know which OS you are using, but if your path looks like this:
/users/johann/xojo_projects/project_a
/users/johann/xojo_projects/project_b
/users/johann/xojo_projects/project_c
You go into each directory and type “hg init” from a command line/DOS prompt.
Then “hg add” to add the files
Then “hg commit” to commit the files.
Then “hg log” will show you your first commit.
Before you do that though make sure you have setup your mercurial user file. On Windows it is mercurial.ini. On Linux & OS X I think it is .mercurial.
Now that you are starting to use VC the next trick is to be sure and perform commits and adds often so that you capture your history as you go along. I would not do the commits & adds as often as I would save a file/project, but rather I would do it at the end of the day or whenever I was about to make a large code change.
A very old rule of thumb (dating back to prehistoric RCS days) is that anytime that you make a change that will result in you compiling the new code to test the change, you should commit / check in that code before you compile.
Now, if we could just get VC support natively added to the IDE :P. There was an old request from pre-Fogbugz days, but that seems to have faded into the fog(z) of history.