--- a/hgext/closehead.py Sun Aug 20 15:38:35 2023 -0400
+++ b/hgext/closehead.py Mon Aug 21 09:50:31 2023 -0400
@@ -58,11 +58,10 @@
date=opts.get('date'),
extra=extra,
)
- tr = repo.transaction(b'commit')
- ret = repo.commitctx(cctx, True)
- bookmarks.update(repo, [rev, None], ret)
- cctx.markcommitted(ret)
- tr.close()
+ with repo.transaction(b'commit'):
+ ret = repo.commitctx(cctx, True)
+ bookmarks.update(repo, [rev, None], ret)
+ cctx.markcommitted(ret)
revs += tuple(opts.get('rev', []))
revs = logcmdutil.revrange(repo, revs)