handle URL changes in the hg backend

Quickly tested, it should work now.

Darcs shouldn't need any changes.