[PATCH] summary: fix type of empty unresolved list

Yuya Nishihara yuya at tcha.org
Fri Jul 7 15:13:41 UTC 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1499436784 -32400
#      Fri Jul 07 23:13:04 2017 +0900
# Node ID de50a2f8fd984912893b6aea79cd0d7ab0b83299
# Parent  e714159860fd0872ae0555bb07546aa7e9f700e0
summary: fix type of empty unresolved list

It was okay because tested as a boolean prior to calling len(), but looked
incorrect.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4774,7 +4774,7 @@ def summary(ui, repo, **opts):
         s = ' '.join(e.recordtypes)
         ui.warn(
             _('warning: merge state has unsupported record types: %s\n') % s)
-        unresolved = 0
+        unresolved = []
     else:
         unresolved = list(ms.unresolved())
 


More information about the Mercurial-devel mailing list