diff hgext/rebase.py @ 37125: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 a8d8cdafe29c
children b48b7b130d08
line wrap: on
line diff
--- a/hgext/rebase.py	Sun Mar 25 11:58:05 2018 +0900
+++ b/hgext/rebase.py	Mon Mar 05 00:30:00 2018 -0500
@@ -525,7 +525,7 @@
                 with ui.configoverride(overrides, 'rebase'):
                     stats = rebasenode(repo, rev, p1, base, self.collapsef,
                                        dest, wctx=self.wctx)
-                    if stats[3] > 0:
+                    if stats.unresolvedcount > 0:
                         if self.inmemory:
                             raise error.InMemoryMergeConflictsError()
                         else: