convert: refactor sink initialisation, to remove hardcoding of hg
We also introduce options to explicitly set the source and destination
repository types.
Improve testing of corner cases a little.
import doctestimport mercurial.changelog# test doctest from changelogdoctest.testmod(mercurial.changelog)import mercurial.httprepodoctest.testmod(mercurial.httprepo)