diff -r f157ef7b1741 -r 2f117c299325 hgext/evolve.py --- a/hgext/evolve.py Tue Jan 26 15:42:01 2016 -0800 +++ b/hgext/evolve.py Sat Jan 23 06:18:01 2016 +0900 @@ -946,7 +946,8 @@ repo.ui.note(_('The stale commit message reference to %s could ' 'not be updated\n') % sha1) - tr = repo.transaction('relocate') + tr = repo.currenttransaction() + assert tr is not None try: try: r = _evolvemerge(repo, orig, dest, pctx, keepbranch) @@ -967,9 +968,8 @@ raise oldbookmarks = repo.nodebookmarks(nodesrc) _finalizerelocate(repo, orig, dest, nodenew, tr) - tr.close() finally: - tr.release() + pass # TODO: remove this redundant try/finally block return nodenew def _bookmarksupdater(repo, oldid, tr): @@ -1839,7 +1839,8 @@ newid = tmpctx = None tmpctx = bumped # Basic check for common parent. Far too complicated and fragile - tr = repo.transaction('bumped-stabilize') + tr = repo.currenttransaction() + assert tr is not None bmupdate = _bookmarksupdater(repo, bumped.node(), tr) try: if not list(repo.set('parents(%d) and parents(%d)', bumped, prec)): @@ -1905,10 +1906,9 @@ obsolete.createmarkers(repo, [(tmpctx, (repo[newid],))], flag=obsolete.bumpedfix) bmupdate(newid) - tr.close() repo.ui.status(_('committed as %s\n') % node.short(newid)) finally: - tr.release() + pass # TODO: remove this redundant try/finally block # reroute the working copy parent to the new changeset repo.dirstate.beginparentchange() repo.dirstate.setparents(newid, node.nullid) @@ -2017,7 +2017,8 @@ """) if progresscb: progresscb() emtpycommitallowed = repo.ui.backupconfig('ui', 'allowemptycommit') - tr = repo.transaction('stabilize-divergent') + tr = repo.currenttransaction() + assert tr is not None try: repo.ui.setconfig('ui', 'allowemptycommit', True) repo.dirstate.beginparentchange() @@ -2032,10 +2033,8 @@ new = repo['.'] obsolete.createmarkers(repo, [(other, (new,))]) phases.retractboundary(repo, tr, other.phase(), [new.node()]) - tr.close() finally: repo.ui.restoreconfig(emtpycommitallowed) - tr.release() def divergentdata(ctx): """return base, other part of a conflict