I use Mercurial, and I immediately push every commit to BitBucket.
I recently made a commit to my local repository, and pushed it to BitBucket via hg push. Later, I realised that I shouldn't have made that commit, so I tried:
$ hg rollback
repository tip rolled back to revision 37 (undo push-response)
But the file in Xcode did not change. I closed the Xcode window and reopened it, but no change. I tried to revert the rollback in Bitbucket, but that didn't work either:
$ hg push ssh://hg@bitbucket.org/myuser/myproject
pushing to ssh://hg@bitbucket.org/myuser/myproject
searching for changes
no changes found
How do I rollback, both locally and in BitBucket? I want the code to go back to the state it was in before the bad commit.