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

login
register
mail settings
Submitter Boris Feld
Date Dec. 8, 2017, 10:58 a.m.
Message ID <02131064aabbd4b3b686.1512730684@FB>
Download mbox | patch
Permalink /patch/26093/
State Accepted
Headers show

Comments

Boris Feld - Dec. 8, 2017, 10:58 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@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

Patch

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: