refactor mercurial code to only make 1 call
refactor mercurial code to only make 1 call

This simplifies the mercurial code a bit and has the added benefit of
speeding up the runtime of the script.  My sample time dropped
from 14s to 10s, so not an earth-shattering improvement, but
definitely an improvement.

markdrago/flypaper,markdrago/flypaper,markdrago/flypaper