def __init__(self, repo):
        storetype = repo.ui.config("infinitepush", "storetype", "")
        if storetype == "disk":
            self.store = filebundlestore(repo)
        elif storetype == "external":
            self.store = externalbundlestore(repo)
        else:
            raise error.Abort(
                _("unknown infinitepush store type specified %s") % storetype
            )

        indextype = repo.ui.config("infinitepush", "indextype", "")
        if indextype == "disk":
            from . import fileindex

            self.index = fileindex.fileindex(repo)
        elif indextype == "sql":
            # Delayed import of sqlindex to avoid including unnecessary
            # dependencies on mysql.connector.
            from . import sqlindex

            self.index = sqlindex.sqlindex(repo)
        else:
            raise error.Abort(
                _("unknown infinitepush index type specified %s") % indextype
            )