There is exactly the same problem with http://www.pythonanywhere.com (they use python 2.6.6 and web2py 1.99.7). But I've found that it imports:
from mercurial import ui, hg, cmdutil, scmutil and in fact the *scmutil *fails to be imported manually. Maybe you need an updated version of mercurial? Nico --