Example #1
0
    def run_cmd(self):
        query_limit = 100
        num_to_display = 50
        branch = 'master'
        project_names = self.get_project_names()
        extracted_distro_locations = {'new': '/tmp/distro_new', 'old': '/tmp/distro_old'}

        new_changes = Changes(branch, extracted_distro_locations['new'], num_to_display,
                              query_limit, project_names, self.remote_url)

        new_projects = new_changes.run_cmd()
        new_changes.pretty_print_projects(new_projects)

        old_changes = Changes(branch, extracted_distro_locations['old'], num_to_display,
                              query_limit, project_names, self.remote_url)

        old_projects = old_changes.run_cmd()
        old_changes.pretty_print_projects(old_projects)

        patchset_diff = []
        print("\nPatch differences:\n------------------")
        for project_name, values in new_projects.items():
            new_gerrits = values['includes']
            for gerrit in new_gerrits:
                if gerrit not in old_projects[project_name]['includes']:
                    patchset_diff.append(gerrit)
                    print('{:<20}{}\t{}'.format(project_name, gerrit['url'], gerrit['subject']))

        print("\n%s different patches between the two distros." % len(patchset_diff))
    def run_cmd(self):
        query_limit = 100
        num_to_display = 50
        branch = "master"
        project_names = self.get_project_names()
        extracted_distro_locations = {
            "new": "/tmp/distro_new",
            "old": "/tmp/distro_old",
        }

        new_changes = Changes(
            branch,
            extracted_distro_locations["new"],
            num_to_display,
            query_limit,
            project_names,
            self.remote_url,
        )

        new_projects = new_changes.run_cmd()
        new_changes.pretty_print_projects(new_projects)

        old_changes = Changes(
            branch,
            extracted_distro_locations["old"],
            num_to_display,
            query_limit,
            project_names,
            self.remote_url,
        )

        old_projects = old_changes.run_cmd()
        old_changes.pretty_print_projects(old_projects)

        patchset_diff = []
        print("\nPatch differences:\n------------------")
        for project_name, values in new_projects.items():
            new_gerrits = values["includes"]
            for gerrit in new_gerrits:
                if gerrit not in old_projects[project_name]["includes"]:
                    patchset_diff.append(gerrit)
                    print(
                        "{:<20}{}\t{}".format(
                            project_name, gerrit["url"], gerrit["subject"]
                        )
                    )

        print("\n%s different patches between the two distros." % len(patchset_diff))
Example #3
0
 def run_cmd(branch,
             distro_patch,
             limit,
             qlimit,
             project_names,
             remote_url,
             loglevel=0):
     changes = Changes(branch, distro_patch, limit, qlimit, project_names,
                       remote_url, loglevel)
     projects = changes.run_cmd()
     changes.pretty_print_projects(projects)
Example #4
0
    def run_cmd(self):
        query_limit = 100
        num_to_display = 50
        branch = 'master'
        project_names = self.get_project_names()
        extracted_distro_locations = {
            'new': '/tmp/distro_new',
            'old': '/tmp/distro_old'
        }

        new_changes = Changes(branch, extracted_distro_locations['new'],
                              num_to_display, query_limit, project_names,
                              self.remote_url)

        new_projects = new_changes.run_cmd()
        new_changes.pretty_print_projects(new_projects)

        old_changes = Changes(branch, extracted_distro_locations['old'],
                              num_to_display, query_limit, project_names,
                              self.remote_url)

        old_projects = old_changes.run_cmd()
        old_changes.pretty_print_projects(old_projects)

        patchset_diff = []
        print("\nPatch differences:\n------------------")
        for project_name, values in new_projects.items():
            new_gerrits = values['includes']
            for gerrit in new_gerrits:
                if gerrit not in old_projects[project_name]['includes']:
                    patchset_diff.append(gerrit)
                    print('{:<20}{}\t{}'.format(project_name, gerrit['url'],
                                                gerrit['subject']))

        print("\n%s different patches between the two distros." %
              len(patchset_diff))
Example #5
0
 def run_cmd(branch, distro_patch, limit, qlimit, project_names, remote_url, loglevel=0):
     changes = Changes(branch, distro_patch, limit, qlimit, project_names, remote_url, loglevel)
     projects = changes.run_cmd()
     changes.pretty_print_projects(projects)