From patchwork Sun Jul 1 12:37:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D3862: histedit: use hg.updaterepo() to avoid ui.{push|pop}buffer() hack From: phabricator X-Patchwork-Id: 32544 Message-Id: <1a311a790fb336c47baaf1b1441580a7@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sun, 1 Jul 2018 12:37:32 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG3beb0ea083df: histedit: use hg.updaterepo() to avoid ui.{push|pop}buffer() hack (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3862?vs=9374&id=9388 REVISION DETAIL https://phab.mercurial-scm.org/D3862 AFFECTED FILES hgext/histedit.py CHANGE DETAILS To: pulkit, durin42, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -779,9 +779,7 @@ def finishfold(self, ui, repo, ctx, oldctx, newnode, internalchanges): parent = ctx.parents()[0].node() - repo.ui.pushbuffer() - hg.update(repo, parent) - repo.ui.popbuffer() + hg.updaterepo(repo, parent, False) ### prepare new commit data commitopts = {} commitopts['user'] = ctx.user() @@ -812,9 +810,7 @@ skipprompt=self.skipprompt()) if n is None: return ctx, [] - repo.ui.pushbuffer() - hg.update(repo, n) - repo.ui.popbuffer() + hg.updaterepo(repo, n, False) replacements = [(oldctx.node(), (newnode,)), (ctx.node(), (n,)), (newnode, (n,)), @@ -1176,9 +1172,7 @@ def _finishhistedit(ui, repo, state, fm): """This action runs when histedit is finishing its session""" - repo.ui.pushbuffer() - hg.update(repo, state.parentctxnode, quietempty=True) - repo.ui.popbuffer() + hg.updaterepo(repo, state.parentctxnode, False) mapping, tmpnodes, created, ntm = processreplacement(state) if mapping: