# HG changeset patch # User Sushil khanchi # Date 1557753478 -19800 # Node ID c720d09c2366a9084ec3cfec7c380a8b6a637ad8 # Parent c4cab1dd31b74656951689a7b3eff578e3e63bde touch: use util.acceptintervention() for closing the transaction It will close the transaction on InterventionRequired. diff -r c4cab1dd31b7 -r c720d09c2366 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Mon May 13 18:45:00 2019 +0530 +++ b/hgext3rd/evolve/cmdrewrite.py Mon May 13 18:47:58 2019 +0530 @@ -1362,8 +1362,10 @@ rewriteutil.precheck(repo, revs, 'touch') tmpl = utility.shorttemplate displayer = compat.changesetdisplayer(ui, repo, {'template': tmpl}) - with repo.wlock(), repo.lock(), repo.transaction('touch'): - touchnodes(ui, repo, revs, displayer, **opts) + with repo.wlock(), repo.lock(): + tr = repo.transaction('touch') + with util.acceptintervention(tr): + touchnodes(ui, repo, revs, displayer, **opts) def touchnodes(ui, repo, revs, displayer, **opts): duplicate = opts['duplicate']