This patch adds support for EHG_OFFLINE and ESCM_OFFLINE to mercurial.eclass, in a method similar to git.eclass and svn.eclass.
Created attachment 200052 [details, diff] patch for mercurial.eclass
Looks good, committed.