I merged your changes, removed "result = None", changed the printing order (not yet ran the testsuite and not yet committed); regarding this comment:
# Encode target because it may have non-ascii characters, and
# so can the revids. target = target.encode('utf-8')
A simple test says that before running "encode()", target is a unicode string (ok) but result.(old|new)_revid are str. So maybe "so can the revids" should be removed? On the other hand, if it is really a correct comment, shouldn't there be an encode() on those revids before printing them?
I merged your changes, removed "result = None", changed the printing order (not yet ran the testsuite and not yet committed); regarding this comment:
target = target. encode( 'utf-8' ) (old|new) _revid are str. So maybe "so can the revids" should be removed? On the other hand, if it is really a correct comment, shouldn't there be an encode() on those revids before printing them?
# Encode target because it may have non-ascii characters, and
# so can the revids.
A simple test says that before running "encode()", target is a unicode string (ok) but result.