##// END OF EJS Templates
closehead: wrap transaction handling in a context manager
Matt Harbison -
r51767:f12d53a6 default
parent child Browse files
Show More
@@ -58,11 +58,10 b' def close_branch(ui, repo, *revs, **opts'
58 58 date=opts.get('date'),
59 59 extra=extra,
60 60 )
61 tr = repo.transaction(b'commit')
62 ret = repo.commitctx(cctx, True)
63 bookmarks.update(repo, [rev, None], ret)
64 cctx.markcommitted(ret)
65 tr.close()
61 with repo.transaction(b'commit'):
62 ret = repo.commitctx(cctx, True)
63 bookmarks.update(repo, [rev, None], ret)
64 cctx.markcommitted(ret)
66 65
67 66 revs += tuple(opts.get('rev', []))
68 67 revs = logcmdutil.revrange(repo, revs)
General Comments 0
You need to be logged in to leave comments. Login now