Example #1
0
def debug(argv=None):
    """Helper to debug the Sync command."""
    from gitrepo.app import debug
    debug("sync", GitSyncCommand, argv)
Example #2
0
def debug(argv=None):
    """Helper to debug the Sync command."""
    from gitrepo.app import debug
    debug("sync", GitSyncCommand, argv)
Example #3
0
                            help="Create JUnit XML file.")
        return parser

    def take_action(self, parsed_args):
        data = validator.validate_file_by_schema(schemas.PROJECTS_SCHEMA,
                                                 parsed_args.path)
        result = self.client.sync(data, parsed_args.project, parsed_args.force,
                                  parsed_args.num_threads)
        total = len(result)
        passed = sum([v.values()[0][0] for v in result])
        failed_projects = [i for i in result if not i.values()[0][0]]
        failed_msg = '\n'.join(map(self.unpack_results, failed_projects))
        self.app.stdout.write("====================\nCompleted...\n\n")
        self.app.stdout.write("TOTAL: {0}\n"
                              "  Successfully synced: {1}\n"
                              "  Synced FAILED: {2}\n-----\n{3}\n"
                              "".format(total, passed, total - passed,
                                        failed_msg))
        if parsed_args.junit_xml:
            self.create_junit_xml_file(result, parsed_args.junit_xml)


def debug(argv=None):
    """Helper to debug the Sync command."""
    from gitrepo.app import debug
    debug("sync", GitSyncCommand, argv)


if __name__ == "__main__":
    debug()
Example #4
0
            parsed_args.path
        )
        result = self.client.sync(data,
                                  parsed_args.project,
                                  parsed_args.force,
                                  parsed_args.num_threads)
        total = len(result)
        passed = sum([v.values()[0][0] for v in result])
        failed_projects = [i for i in result if not i.values()[0][0]]
        failed_msg = '\n'.join(map(self.unpack_results, failed_projects))
        self.app.stdout.write("====================\nCompleted...\n\n")
        self.app.stdout.write("TOTAL: {0}\n"
                              "  Successfully synced: {1}\n"
                              "  Synced FAILED: {2}\n-----\n{3}\n"
                              "".format(total,
                                        passed,
                                        total - passed,
                                        failed_msg))
        if parsed_args.junit_xml:
            self.create_junit_xml_file(result, parsed_args.junit_xml)


def debug(argv=None):
    """Helper to debug the Sync command."""
    from gitrepo.app import debug
    debug("sync", GitSyncCommand, argv)


if __name__ == "__main__":
    debug()