Mercurial > evolve
changeset 4640:c720d09c2366
touch: use util.acceptintervention() for closing the transaction
It will close the transaction on InterventionRequired.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Mon, 13 May 2019 18:47:58 +0530 |
parents | c4cab1dd31b7 |
children | 686b9a7d3b46 |
files | hgext3rd/evolve/cmdrewrite.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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']