cmdrewrite: use context manager for some locks and transactions
These were the trivial cases where I didn't even need to extend the
scope of a transaction or change indentation to fix it.
# name space package to host third party extensions
from __future__ import absolute_import
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)