comparison hgext/histedit.py @ 42052:15d2afa31e57

histedit: narrow the scope of discarded ui output In 34165875fa5df813bec3a0cd348932b304d44efb, a lot of the output from histedit was excluded. This slightly adjusts the scope of that exclusion, to both discard more uninsteresting messages, and ensure that pre-merge-tool output gets shown before the external merge tool is executed. Differential Revision: https://phab.mercurial-scm.org/D6177
author Rodrigo Damazio Bovendorp <rdamazio@google.com>
date Mon, 01 Apr 2019 19:02:24 -0700
parents 1f567a9e25bd
children fc0095256513
comparison
equal deleted inserted replaced
42051:f4147ca63d39 42052:15d2afa31e57
520 parentctx, but does not commit them.""" 520 parentctx, but does not commit them."""
521 repo = self.repo 521 repo = self.repo
522 rulectx = repo[self.node] 522 rulectx = repo[self.node]
523 repo.ui.pushbuffer(error=True, labeled=True) 523 repo.ui.pushbuffer(error=True, labeled=True)
524 hg.update(repo, self.state.parentctxnode, quietempty=True) 524 hg.update(repo, self.state.parentctxnode, quietempty=True)
525 repo.ui.popbuffer()
525 stats = applychanges(repo.ui, repo, rulectx, {}) 526 stats = applychanges(repo.ui, repo, rulectx, {})
526 repo.dirstate.setbranch(rulectx.branch()) 527 repo.dirstate.setbranch(rulectx.branch())
527 if stats.unresolvedcount: 528 if stats.unresolvedcount:
528 buf = repo.ui.popbuffer()
529 repo.ui.write(buf)
530 raise error.InterventionRequired( 529 raise error.InterventionRequired(
531 _('Fix up the change (%s %s)') % 530 _('Fix up the change (%s %s)') %
532 (self.verb, node.short(self.node)), 531 (self.verb, node.short(self.node)),
533 hint=_('hg histedit --continue to resume')) 532 hint=_('hg histedit --continue to resume'))
534 else:
535 repo.ui.popbuffer()
536 533
537 def continuedirty(self): 534 def continuedirty(self):
538 """Continues the action when changes have been applied to the working 535 """Continues the action when changes have been applied to the working
539 copy. The default behavior is to commit the dirty changes.""" 536 copy. The default behavior is to commit the dirty changes."""
540 repo = self.repo 537 repo = self.repo
591 """Merge changeset from ctx (only) in the current working directory""" 588 """Merge changeset from ctx (only) in the current working directory"""
592 wcpar = repo.dirstate.p1() 589 wcpar = repo.dirstate.p1()
593 if ctx.p1().node() == wcpar: 590 if ctx.p1().node() == wcpar:
594 # edits are "in place" we do not need to make any merge, 591 # edits are "in place" we do not need to make any merge,
595 # just applies changes on parent for editing 592 # just applies changes on parent for editing
593 ui.pushbuffer()
596 cmdutil.revert(ui, repo, ctx, (wcpar, node.nullid), all=True) 594 cmdutil.revert(ui, repo, ctx, (wcpar, node.nullid), all=True)
597 stats = mergemod.updateresult(0, 0, 0, 0) 595 stats = mergemod.updateresult(0, 0, 0, 0)
596 ui.popbuffer()
598 else: 597 else:
599 try: 598 try:
600 # ui.forcemerge is an internal variable, do not document 599 # ui.forcemerge is an internal variable, do not document
601 repo.ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 600 repo.ui.setconfig('ui', 'forcemerge', opts.get('tool', ''),
602 'histedit') 601 'histedit')