Dropbox and Mercurial: and lived happily ever after

Some days ago I ranted about an issue I had with Mercurial and Dropbox; basically, I did put a mercurial repo in a dropbox folder, and ended up with this kind of mess

Mercurial repos inside Dropbox are not a great idea after all. But I had one problem: I sometimes forget to push changes to some files, and Dropbox comes to the rescue; at the same time I need history for such files, and I don't want problems to arise.

I found quite an easy solution:

Now you can use hg init inside “somefolder”, and you'll obtain a non-synced hg repository.

What for? Whatever! I just create a repo on bitbucket and push/pull changes to/from here.

On other machines, after making sure you've excluded .hg from syncing, you can just use

hg clone -U YOUR_REPO_URL

to obtain such .hg directory.

This way:

Enjoy!

#MostlyUnixish #dropbox #mercurial #productivity