stringutil: teach pprint() to indent
This will make data structure dumping in various places a bit
easier to read and diff. Since I wanted this for `hg debugwireproto`
output, I added indentation to it.
A more advanced pretty printer implementation would conditionally
add newlines if output is too long. But it is vastly simpler to
be consistent and always add newlines when indenting.
Again, I'm not crazy about the verbosity of the code and there is
room to consolidate logic for "print a collection." But this isn't
the most complicated code in the world and I'm not convinced it is
worth doing.
Differential Revision: https://phab.mercurial-scm.org/D4399
syntax: glob
*.elc
*.tmp
*.orig
*.rej
*~
*.mergebackup
*.o
*.so
*.dll
*.exe
*.pyd
*.pyc
*.pyo
*$py.class
*.swp
*.prof
*.zip
\#*\#
.\#*
tests/.coverage*
tests/.testtimes*
tests/.hypothesis
tests/hypothesis-generated
tests/annotated
tests/exceptions
tests/*.err
tests/htmlcov
build
contrib/chg/chg
contrib/hgsh/hgsh
contrib/vagrant/.vagrant
dist
packages
doc/common.txt
doc/*.[0-9]
doc/*.[0-9].txt
doc/*.[0-9].gendoc.txt
doc/*.[0-9].{x,ht}ml
MANIFEST
MANIFEST.in
patches
mercurial/__modulepolicy__.py
mercurial/__version__.py
mercurial/hgpythonlib.h
mercurial.egg-info
.DS_Store
tags
cscope.*
.idea/*
.asv/*
i18n/hg.pot
locale/*/LC_MESSAGES/hg.mo
hgext/__index__.py
rust/target/
# Generated wheels
wheelhouse/
syntax: regexp
^\.pc/
^\.(pydev)?project
# hackable windows distribution additions
^hg-python
^hg.py$