Mailinglist Archive: opensuse-gnome (124 mails)
| < Previous | Next > |
[opensuse-gnome] Re: (initial try at) patch count
- From: Rodrigo Moya <rodrigo@xxxxxxxxxx>
- Date: Fri, 21 Sep 2007 18:47:21 +0200
- Message-id: <1190393241.13949.3.camel@xxxxxxxxxxx>
On Fri, 2007-09-21 at 18:01 +0200, Rodrigo Moya wrote:
> Hi
>
> I'm writing an OSC plugin
> (http://en.opensuse.org/Build_Service/osc_plugins) for adding a
> listpatches command. I haven't been able to get the list of files from
> GNOME:UNSTABLE (just a single _link entry shows up), so this is from
> GNOME:STABLE:
>
> http://www.gnome.org/~rodrigo/GNOME:STABLE-2007-09-21-17.53.36
>
> Take into account that some patches might be disabled in the .spec file,
> so not all of them are used, but at least it can give us a first
> impression of what packages need more attention.
a new version of the report:
http://www.gnome.org/~rodrigo/GNOME:STABLE-patchcount.txt
it contains a count at the end with the total number of bugs. I'm now
adding individual counters per package and, at the end, a list with the
packages ordered by number of patches
Find attached the plugin, just copy it to ~/.osc-plugins/
To run it:
osc listpatches $repository
for instance:
osc listpatches GNOME:STABLE
--
Rodrigo Moya <rodrigo@xxxxxxxxxx>
@cmdln.option('--package', metavar='PACKAGE',
help='only patches for this package')
def do_listpatches(self, subcmd, opts, project):
"""${cmd_name}: Display a summary of patches within a package or repository
This command lists the patches on the packages included on the given
repository
Examples:
listpatches GNOME:UNSTABLE # list patches for all projects
listpatches --package=abiword GNOME:UNSTABLE # list patches for a single package
${cmd_usage}
${cmd_option_list}
"""
#only_this_package = opts.package
#if (opts.package != ""):
# bug_summary (opts.package)
# return
patch_count = 0
packages = meta_get_packagelist(conf.config['apiurl'], project)
for package in packages:
print "Patches for %s" % package
files = meta_get_filelist(conf.config['apiurl'], project, package)
for file in files:
extension = os.path.splitext(file)[1]
if extension == ".patch" or extension == ".diff" or extension == ".dif":
patch_count += 1
print "\t%s" % file
print "\n\nNumber of patches found: %d" % patch_count
| < Previous | Next > |