When URL could be either hg or git, try hg first, then try git.