revlog: adapt the `reading` check for `unionrepo`
We cannot just rely on the length check for the `unionrepo` as the local revlog
might be empty while the other revlog contains data. In addition, we need to
also open the second revlog for reading when needed.
from mercurial.i18n import _
from mercurial import changegroup, error, extensions
def abort(orig, *args, **kwargs):
raise error.Abort(_('this is an exercise'))
def uisetup(ui):
extensions.wrapfunction(changegroup, 'getbundler', abort)