__init__: work around exchange not yet existing in hg 2.8.x

This commit is contained in:
Augie Fackler 2014-10-14 11:32:21 -04:00
parent 34580646fc
commit f66dc1e1ac

View File

@ -27,7 +27,12 @@ from mercurial import commands
from mercurial import demandimport
from mercurial import dirstate
from mercurial import discovery
from mercurial import exchange
try:
from mercurial import exchange
exchange.push # existed in first iteration of this file
except ImportError:
# We only *use* the exchange module in hg 3.2+, so this is safe
pass
from mercurial import extensions
from mercurial import help
from mercurial import hg