Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:osc_plugin
osc_maint_plugin
osc_maint.py
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File osc_maint.py of Package osc_maint_plugin
# -*- coding: utf-8 -*- # maint_changes plugin for osc # Author: Alexander Naumov <alexander.naumov@opensuse.org> @cmdln.alias('maint_changes') def do_changes_maint(self, subcmd, opts, *args): rdiff = server_diff("https://api.opensuse.org", "openSUSE:11.3", sys.argv[2], None, "openSUSE:Factory", sys.argv[2], None, True) print "PACKAGE:", sys.argv[2] # first reference point - .changes n1 = rdiff.find('.changes') if n1 == -1: print "error: can't find *.changes file" sys.exit(1) else: up1 = rdiff[n1:] # second reference point n2 = up1.find("----------") if n2 == -1: print "debug: can't find ------------" sys.exit(1) else: up2 = up1[n2:] n3 = up2.find("+") if n3 == -1: print "debug: +" sys.exit(1) else: up3 = up2[n3:] # last reference point end = up1.find('Index:') # All canges (from *.changes) are here: part2 = rdiff[n1+n2+n3:n1+end] # We are looking for all BUGZILLA numbers bnc_all = "" position = 0 while 1: bnc_ = part2[position:-30].find('bnc#') if bnc_ == -1: break bnc = part2[position+bnc_+4:position+bnc_+10] position = position + bnc_+10 bnc_all = bnc_all + bnc + ", " print "BUGZILLA:", bnc_all[:-2] print "DESCRIPTION:" print "\nThis update for", sys.argv[2], "fixes the following issues:\n" l = part2.split("\n") for i in l[:-1]: if i[:3] == '+- ': print i[1:] if i[:3] == '+ ': print i[1:]
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor