Hello community,

here is the log from the commit of package openSUSE-release-tools for 
openSUSE:Factory checked in at 2017-12-07 13:53:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
 and      /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openSUSE-release-tools"

Thu Dec  7 13:53:46 2017 rev:28 rq:550957 version:20171205.1769209

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
    2017-12-05 01:30:49.672013022 +0100
+++ 
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes
       2017-12-07 13:54:27.079947177 +0100
@@ -1,0 +2,8 @@
+Tue Dec 05 12:26:54 UTC 2017 - [email protected]
+
+- Update to version 20171205.1769209:
+  * compare_pkglist: improve submission message
+  * compare_pkglist: add feature to limits submission creating
+  * compare_pkglist: fix a typo
+
+-------------------------------------------------------------------

Old:
----
  openSUSE-release-tools-20171204.4661a09.obscpio

New:
----
  openSUSE-release-tools-20171205.1769209.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.qWp04P/_old  2017-12-07 13:54:28.015913235 +0100
+++ /var/tmp/diff_new_pack.qWp04P/_new  2017-12-07 13:54:28.019913090 +0100
@@ -20,7 +20,7 @@
 %define source_dir osc-plugin-factory
 %define announcer_filename factory-package-news
 Name:           openSUSE-release-tools
-Version:        20171204.4661a09
+Version:        20171205.1769209
 Release:        0
 Summary:        Tools to aid in staging and release work for openSUSE/SUSE
 License:        GPL-2.0+ and MIT

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.qWp04P/_old  2017-12-07 13:54:28.067911350 +0100
+++ /var/tmp/diff_new_pack.qWp04P/_new  2017-12-07 13:54:28.071911205 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param 
name="url">https://github.com/openSUSE/osc-plugin-factory.git</param>
-    <param 
name="changesrevision">4661a09b2f27676c1944bd47e7d19bb99f09058f</param>
+    <param 
name="changesrevision">b165e07db38620d12e4adcd078bbe00fe192d5b8</param>
   </service>
 </servicedata>

++++++ openSUSE-release-tools-20171204.4661a09.obscpio -> 
openSUSE-release-tools-20171205.1769209.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20171204.4661a09/compare_pkglist.py 
new/openSUSE-release-tools-20171205.1769209/compare_pkglist.py
--- old/openSUSE-release-tools-20171204.4661a09/compare_pkglist.py      
2017-12-04 16:28:22.000000000 +0100
+++ new/openSUSE-release-tools-20171205.1769209/compare_pkglist.py      
2017-12-05 13:20:49.000000000 +0100
@@ -40,7 +40,7 @@
 http_POST = osc.core.http_POST
 
 class CompareList(object):
-    def __init__(self, old_prj, new_prj, verbose, newonly, removedonly, 
existin, submit, submitfrom, submitto):
+    def __init__(self, old_prj, new_prj, verbose, newonly, removedonly, 
existin, submit, submitfrom, submitto, submit_limit):
         self.new_prj = new_prj
         self.old_prj = old_prj
         self.verbose = verbose
@@ -49,6 +49,7 @@
         self.submit = submit
         self.submitfrom = submitfrom
         self.submitto = submitto
+        self.submit_limit = submit_limit
         self.removedonly = removedonly
         self.apiurl = osc.conf.config['apiurl']
         self.debug = osc.conf.config['debug']
@@ -115,17 +116,20 @@
                 return ET.tostring(root)
         return False
 
-    def submit_new_package(self, source, target, package):
+    def submit_new_package(self, source, target, package, msg=None):
         req = osc.core.get_request_list(self.apiurl, target, package, 
req_state=('new', 'review', 'declined'))
         if req:
             print("There is a request to %s / %s already, skip!"%(target, 
package))
         else:
-            msg = 'New package submitted by compare_pkglist'
+            if not msg:
+                msg = 'New package submitted by compare_pkglist'
             res = osc.core.create_submit_request(self.apiurl, source, package, 
target, package, message=msg)
             if res and res is not None:
                 print('Created request %s for %s' % (res, package))
+                return True
             else:
                 print('Error occurred when creating the submit request')
+        return False
 
     def crawl(self):
         """Main method"""
@@ -137,7 +141,7 @@
                 if not self.item_exists(self.submitfrom):
                     print("Project %s is not exist"%self.submitfrom)
                     return
-                if not self.item_exists(self.submito):
+                if not self.item_exists(self.submitto):
                     print("Project %s is not exist"%self.submitto)
                     return
 
@@ -152,6 +156,7 @@
             existin_packages = self.get_source_packages(self.existin)
 
         if not self.removedonly:
+            submit_counter = 0
             for pkg in source:
                 if pkg.startswith('000') or pkg.startswith('_'):
                     continue
@@ -168,13 +173,22 @@
 
                     print("New package than {:<8} - {}".format(self.new_prj, 
pkg))
                     if self.submit:
+                        if self.submit_limit and submit_counter > 
int(self.submit_limit):
+                            return
+
                         if self.submitfrom and self.submitto:
                             if not self.item_exists(self.submitfrom, pkg):
                                 print("%s not found in %s"%(pkg, 
self.submitfrom))
                                 continue
-                            self.submit_new_package(self.submitfrom, 
self.submitto, pkg)
+                            msg = "Automated submission of a package from %s 
to %s" % (self.submitfrom, self.submitto)
+                            if self.existin:
+                                msg += " that was included in %s" % 
(self.existin)
+                            if self.submit_new_package(self.submitfrom, 
self.submitto, pkg, msg):
+                                submit_counter += 1
                         else:
-                            self.submit_new_package(self.old_prj, 
self.new_prj, pkg)
+                            msg = "Automated submission of a package from %s 
that is new in %s" % (self.old_prj, self.new_prj)
+                            if self.submit_new_package(self.old_prj, 
self.new_prj, pkg, msg):
+                                submit_counter += 1
                 elif not self.newonly:
                     diff = self.check_diff(pkg, self.old_prj, self.new_prj)
                     if diff:
@@ -192,7 +206,7 @@
     osc.conf.config['debug'] = args.debug
 
     uc = CompareList(args.old_prj, args.new_prj, args.verbose, args.newonly,
-            args.removedonly, args.existin, args.submit, args.submitfrom, 
args.submitto)
+            args.removedonly, args.existin, args.submit, args.submitfrom, 
args.submitto, args.submit_limit)
     uc.crawl()
 
 if __name__ == '__main__':
@@ -221,6 +235,8 @@
                         help='submit new package from, define --submitto is 
required')
     parser.add_argument('--submitto', dest='submitto', metavar='PROJECT',
                         help='submit new package to, define --submitfrom is 
required')
+    parser.add_argument('--limit', dest='submit_limit', metavar='NUMBERS',
+                        help='limit numbers packages to submit')
 
     args = parser.parse_args()
 

++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.qWp04P/_old  2017-12-07 13:54:28.751886546 +0100
+++ /var/tmp/diff_new_pack.qWp04P/_new  2017-12-07 13:54:28.755886401 +0100
@@ -1,5 +1,5 @@
 name: openSUSE-release-tools
-version: 20171204.4661a09
-mtime: 1512401302
-commit: 4661a09b2f27676c1944bd47e7d19bb99f09058f
+version: 20171205.1769209
+mtime: 1512476449
+commit: 1769209240a34cf227c92baae46e2aaaccbc762f
 


Reply via email to