The old code was referencing record and crecord, which are
deprecated. hg commit --interactive is the preferred mechanism
to use.
In addition, there was duplicate code in this function. It has
been removed.
Tests have been added to cover this function.