How to use the libmozdata.hgmozilla.Revision function in libmozdata

To help you get started, we’ve selected a few libmozdata examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / relman-auto-nag / auto_nag / scripts / code_freeze_week.py View on Github external
def handler(patch, data):
            info = self.patch_analysis(patch)
            if "addlines" not in data:
                data.update(info)
            else:
                for k, v in info.items():
                    data[k] += v

        for info in bugs.values():
            for rev, i in info["land"].items():
                if not i["backedout"]:
                    queries.append(Query(url, {"node": rev}, handler, info))

        if queries:
            hgmozilla.Revision(queries=queries).wait()

        torm = []
        for bug, info in bugs.items():
            landed_patches = [v["backedout"] for v in info["land"].values()].count(
                False
            )
            # bug with only backouts
            if landed_patches == 0:

                torm.append(bug)
            else:
                info["landed_patches"] = landed_patches

        # Remove bugs that we don't want to show
        for bug in torm:
            del bugs[bug]