diff hgext/histedit.py @ 37128:6f570c501e3e

merge: deprecate accessing update results by index Now that we have named attributes, let's convert the code base to use them. We also add deprecation warnings so legacy consumers are aware of their transgressions. ``stats.unresolvedcount`` is much easier to read than ``stats[3]``, don't you think? Differential Revision: https://phab.mercurial-scm.org/D2694
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 05 Mar 2018 00:30:00 -0500
parents 0351fb0153ba
children 3809eafedf2c
line wrap: on
line diff
--- a/hgext/histedit.py	Sun Mar 25 11:58:05 2018 +0900
+++ b/hgext/histedit.py	Mon Mar 05 00:30:00 2018 -0500
@@ -499,7 +499,7 @@
         hg.update(repo, self.state.parentctxnode, quietempty=True)
         stats = applychanges(repo.ui, repo, rulectx, {})
         repo.dirstate.setbranch(rulectx.branch())
-        if stats and stats[3] > 0:
+        if stats.unresolvedcount:
             buf = repo.ui.popbuffer()
             repo.ui.write(buf)
             raise error.InterventionRequired(