Add :hg build requirement.

Closes #19074.