Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 35348:740d40ec15c3
debugformat: handle non-boolean value for variant
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 07 Dec 2017 16:49:24 +0100 |
parents | bd326f3e0e14 |
children | c0b6fa74e007 |
comparison
equal
deleted
inserted
replaced
35347:bd326f3e0e14 | 35348:740d40ec15c3 |
---|---|
872 | 872 |
873 def makeformatname(name): | 873 def makeformatname(name): |
874 return '%s:' + (' ' * (maxvariantlength - len(name))) | 874 return '%s:' + (' ' * (maxvariantlength - len(name))) |
875 | 875 |
876 def formatvalue(value): | 876 def formatvalue(value): |
877 if util.safehasattr(value, 'startswith'): | |
878 return value | |
877 if value: | 879 if value: |
878 return 'yes' | 880 return 'yes' |
879 else: | 881 else: |
880 return 'no' | 882 return 'no' |
881 | 883 |