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.
#require black test-repo
Black needs the real USERPROFILE in order to run on Windows
#if msys
$ USERPROFILE="$REALUSERPROFILE"
$ export USERPROFILE
#endif
$ cd $RUNTESTDIR/..
$ black --check --diff `hg files 'set:(**.py + grep("^#!.*python")) - mercurial/thirdparty/**'`