Refer to discussion on D21677#275541
Refs D21681 (arcanist changes)
Phabricator has several uses of the --debug flag being used with Mercurial. Use of this flag causes additional output to be added which Phabricator needs, however the behavior of --debug is not guaranteed to be stable, and in newer versions of Mercurial there have been additional output that has caused Phabricator to choke on parsing the output. This change removes several uses of --debug in favor of using --template with the hg log or hg annotate commands in combination with the {p1.node} or {p2.node} template format.
The use of {p1node} format in templates was added in Mercurial 2.4 (2012). This format was deprecated in Mercurial 4.9 (2019) in favor of using {p1.node} format which is unclear when this new format was added (presumably earlier than Mercurial 4.9).
The use of --template with hg annotate is only officially supported in Mercurial 4.6 (2018), though does appear to work in 4.5 but is not documented.
Since the {p1node} format was introduced in 2.4 this bumps the required version of hg to 2.4 (from 1.9). Since the annotate --template feature wasn't added until 4.6 (which is still fairly recent), the use of it is gated on a capability test, but still preferred for use where possible to avoid extraneous output from --debug flag.