views:

957

answers:

3

I'm using Mercurial as my SCM, mainly because I like the ability to commit changes to a project even while offline. I'm going to be moving PCs soon and so I decided to look into finding some free Mercurial repo hosting so I don't lose my data. I signed up for a Bitbucket account and I noticed that they offer space for only a single private repository with their free accounts. Wouldn't that mean that some of my stuff might end up publicly available? As in, anyone can download and use it in their projects?

+4  A: 

Yes, unless you put them all under a single repository. Otherwise, you need to pay them for more private repos.

Hank Gay
Yup, how else would they make money from their service? GitHub doesn't even offer a free private repo...
MattGWagner
+7  A: 

Yes, BitBucket only offers one private repository for free.

However, if you're just worried about transferring the projects to your new machine, I think BitBucket is overkill. Will you be in possession of both machines at once, even for a short period of time?

If so, I would just use hg serve in each project directory (one at a time) of the old machine and hg clone http://ip.of.old.machine:8000/ projectname to clone the changes onto the new machine.

EDIT: If you're looking for a way to back up without sharing the repos publicly you could get a Dropbox account and clone a copy of each repo to the Dropbox folder on your local machine. Whenever you push changes they'll get synced up to Dropbox automatically.

If you computer catches on fire and you replace it you just install Dropbox and then clone from the repos in the Dropbox folder to your preferred location.

I'm not sure how well this would work if you want to use the Dropbox copy of the repo on multiple platforms (from a Windows box and a Linux box, for example).

Steve Losh
Well, no, it's not just transferring stuff to the new machine. I'd like to have a 'backup copy' stored somewhere safe in case something disastrous happens to both my PCs. I'm just worried that if I place this on BitBucket as a non-private repo someone will take the code, use it, and then hold me responsible for whatever happens because of it.
cornjuliox
**@cornjuliox** I've edited the answer to mention Dropbox, which might fit your needs.
Steve Losh
I believe they recently started offering unlimited number of private repos for the free 5 user account.
Roberto Sebestyen
+7  A: 

run hg bundle --all in all your repositories, stuff the bundles somewhere (like a usb stick), hg unbundle them on the new machine.

just somebody
You don't even have to be that clever. Just zip them up, back up the zips, and unzip. viola!
basszero