[repo] make extid2eid work with either a session or a connection
The only place it should matter is for restoring pending_operations in
case of failure. Which is not exercised by the test suite. Here be
dragons.
Upstream Author:
%(author)s <%(author-email)s>
Copyright:
Copyright (c) %(year)s %(author)s.
%(author-web-site)s -- mailto:%(author-email)s