Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:17:47 -0700] rev 38361
import: use context manager for lock, dirstateguard, transaction
A tiny side-effect is that the transaction is now closed after saving
the commit message.
Differential Revision: https://phab.mercurial-scm.org/D3748