For now, I'm just typing around the edges to help find issues with TortoiseHg.
If the custom hgdate type is useful elsewhere as I go, I'll move it to a file
dedicated to custom types. I'm not loving the ban on camelcase type names here
that test-check-code.t flagged, but I'm not sure how to disable that even if
everyone agreed that it's a bad idea to go against the normal convention for
types.
While here, fix an issue that pytype found in parsedate when an invalid date
tuple is passed by raising a ProgrammingError instead of crashing. (Tuple
doesn't have a strip attribute.)