So something very important to developers is backing up your code, and also version control. In this post I am going to show how to set up a mercurial repository inside a dropbox. This post requires some knowledge of mercurial and or version control. This will enable a version control system inside a dropbox for backup and easy to access on other computers. I am using TortoiseHG for handling mercurial, you can check it out and download it here http://tortoisehg.bitbucket.org/. And for dropbox you can get it here http://db.tt/E3rO0W6E <– (that is a referral link, if you use it you get an extra 500MB of storage and so do I.)
So after you both of those installed (if you are having trouble and need help leave me a comment or send me an email and I will do my best to help you) Go to the folder the project you want to add to version control. Right click in the folder and go to TortoiseHg > Create Repositoy
Then you will need to Init the repository, you should see a popup like this.
Click Create and then you have your repository created. Now you need to commit your files into the repository. But before the commit, you should edit the .hgignore file. What this does is ignore files you don’t want to or you shouldn’t commit.
Here is the ignore file I use. I got this from somewhere on the internet and it takes care of a good amount of files. This file tells what files and directors to ignore when committing files.
Now copy the project folder and paste it into your dropbox folder. When you installed dropbox it created a folder called dropbox(in you followed the default install) I created a folder in it called Projects and then pasted my project folder(UnderBridgeGraffiti) in it.
You can now open the repository explorer(workbench), right click in the folder (in the dropbox folder) and then click on Hg Workbench.
Once you open up the workbench you need to commit all your file to the repository.
First (1) click on the check mark at the top of the explorer to check all the files that need to be committed to the repository. Second (2) click that check box to select all the files you want to commit to the repository. Then fill in the text box with a description(Init Commit) and then click commit (3). It will ask you if you want to add untracked files, select yes since there are no tracked files and you want to track all those files.
Congratulations you just created a repository inside your dropbox folder.
Now you can access your version control on any computer you have dropbox installed on.
If you wanted to create a clone of the repository so you can have the dropbox as the master file go to another computer or folder. Right click inside the folder, TortoiseHg -> Clone