[PATCH 5 of 6] debugformat: handle non-boolean value for variant

Boris Feld boris.feld at octobus.net
Fri Dec 8 05:58:04 EST 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1512661764 -3600
#      Thu Dec 07 16:49:24 2017 +0100
# Node ID 02131064aabbd4b3b686c6005070bf3f6baea27b
# Parent  88e1cddecf068bac5850a0beea0354ffa29f78c3
# EXP-Topic upgrade
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 02131064aabb
debugformat: handle non-boolean value for variant

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -874,6 +874,8 @@ def debugformat(ui, repo, **opts):
         return '%s:' + (' ' * (maxvariantlength - len(name)))
 
     def formatvalue(value):
+        if util.safehasattr(value, 'startswith'):
+            return value
         if value:
             return 'yes'
         else:


More information about the Mercurial-devel mailing list