Please test it and if it works ping us to review and commit it;
I have tested the patch, found one bug, so I am attaching the updated patch. It worked in my environment, though I might have not considered all use cases.
Can you port your patch to the current version of choose-mirror? the patch doesn't apply in current git version.