pure: guard against empty blocks
If blocks is empty, we append `None` to the returned list, which is
incorrect.
This subtle issue was caught by pytype, which correctly identified
the return value as List[Optional[Tuple]] because of this possibility.
Differential Revision: https://phab.mercurial-scm.org/D9279
Mercurial's documentation is kept in reStructuredText format, which is
a simple plain text format that's easy to read and edit:
http://docutils.sourceforge.net/rst.html
It's also convertible to a variety of other formats including standard
UNIX man page format and HTML. You'll need to install Docutils:
http://docutils.sourceforge.net/
Use the Makefile in this directory to generate the man and HTML pages.