debugbuilddag: use context manager for progress, locks, transaction
I minor side-effect is that .hg/localtags is now written before the
transaction commits.
Differential Revision: https://phab.mercurial-scm.org/D3777
adding changesets
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
new changesets d326ae2d01ee
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
adding changesets
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
new changesets d326ae2d01ee
4 files updated, 0 files merged, 0 files removed, 0 files unresolved