Blog do Eduardo Costa Meu blog pessoal


Mercurial 1, Subversion/CVS 0

That should work on GIT, too. I made a big mistake today. I'm working on a pet-project for iOS, and, after a few weeks, I decided to push the Mercurial changes to my personal server. I created the remote repo, but the "push" was made into another repo (my CuteGod for iOS). Darn you, MacHg! I could use a "that repo is not empty" message!

It was ruined: CuteGod revisions where "squished" below the new project. Ugly to see, worst to recover. My backup was outdated - specially for other projects I was working. What to do?

After some evil sites telling me that I need to "hg revert" or "hg backout", I simply remembered: "this is a distributed repo"! I have a complete, updated backup with my working copy! It was a matter of deleting the trashed repo, creating a new one and making an "hg push". Simple as that.

That simple move is impossible to make with centralized repos, like SVN or CVS!

Filed under: opensource No Comments