Fixes T4257. The hg heads command exits with an error code and no output in an empty repository.
Just ignore the error code: we don't have a great way to distinguish between errors, and we ran another hg command moments before, so we have at least some confidence it isn't a PATH sort of thing.