@strFields(t = None, v = "")
    @checkAuth(write=False)
    def troveInfo(self, auth, t, v):
        t = unquote(t)
        leaves = {}
        for serverName in self.serverNameList:
            newLeaves = self.repos.getTroveVersionList(serverName, {t: [None]})
            leaves.update(newLeaves)
        if t not in leaves:
            return self._write("error",
                               error = '%s was not found on this server.' %t)

        versionList = sorted(leaves[t].keys(), reverse = True)

        if not v:
            reqVer = versionList[0]
        else:
            try:
                reqVer = versions.VersionFromString(v)
            except (versions.ParseError, __HOLE__):
                try:
                    reqVer = versions.ThawVersion(v)
                except:
                    return self._write("error",
                                       error = "Invalid version: %s" %v)

        try:
            query = [(t, reqVer, x) for x in leaves[t][reqVer]]
        except KeyError:
            return self._write("error",
                               error = "Version %s of %s was not found on this server."
                               %(reqVer, t))
        troves = self.repos.getTroves(query, withFiles = False)
        mdata = self.repos.getMetadata([t, reqVer.branch()], reqVer.branch().label())
        if t in mdata:
            mdata = mdata[t]

        return self._write("trove_info", troveName = t, troves = troves,
            versionList = versionList,
            reqVer = reqVer,
            metadata = mdata)
dataset/ETHPy150Open sassoftware/conary/conary/web/repos_web.py/ReposWeb.troveInfo