Hello community,

here is the log from the commit of package openSUSE-release-tools for 
openSUSE:Factory checked in at 2019-08-30 14:41:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
 and      /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openSUSE-release-tools"

Fri Aug 30 14:41:44 2019 rev:211 rq:727059 version:20190829.e912e9d2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
    2019-08-29 17:25:02.803292218 +0200
+++ 
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.7948/openSUSE-release-tools.changes
  2019-08-30 14:41:46.657418660 +0200
@@ -1,0 +2,25 @@
+Thu Aug 29 15:44:59 UTC 2019 - [email protected]
+
+- Update to version 20190829.e912e9d2:
+  * obs_operator: allow illegal cookie keys.
+
+-------------------------------------------------------------------
+Thu Aug 29 13:29:48 UTC 2019 - [email protected]
+
+- Update to version 20190829.f74d0c1d:
+  * osc-origin: update: indicate which package is being checked.
+
+-------------------------------------------------------------------
+Thu Aug 29 13:14:58 UTC 2019 - [email protected]
+
+- Update to version 20190829.64280909:
+  * web/origin-manager: allow a request to be diffed against a potential 
origin.
+  * web/origin-manager: display the reason for a diff failure.
+  * web/origin-manager: properly handle potential origin de-selection.
+  * web/origin-manager: properly handle package de-selection.
+  * web/origin-manager: clear table data before loading new data.
+  * web/origin-manager: table_selection_set(): handle undefined table.
+  * osclib/origin: origin_history(): expose source_(project,package,revision).
+  * obs_operator: handle_package_diff(): expose target package and revision.
+
+-------------------------------------------------------------------

Old:
----
  openSUSE-release-tools-20190828.14971e2d.obscpio

New:
----
  openSUSE-release-tools-20190829.e912e9d2.obscpio

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

Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.ZgpdOx/_old  2019-08-30 14:41:47.561418567 +0200
+++ /var/tmp/diff_new_pack.ZgpdOx/_new  2019-08-30 14:41:47.561418567 +0200
@@ -20,7 +20,7 @@
 %define source_dir openSUSE-release-tools
 %define announcer_filename factory-package-news
 Name:           openSUSE-release-tools
-Version:        20190828.14971e2d
+Version:        20190829.e912e9d2
 Release:        0
 Summary:        Tools to aid in staging and release work for openSUSE/SUSE
 License:        GPL-2.0-or-later AND MIT

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.ZgpdOx/_old  2019-08-30 14:41:47.585418565 +0200
+++ /var/tmp/diff_new_pack.ZgpdOx/_new  2019-08-30 14:41:47.585418565 +0200
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param 
name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param>
-    <param 
name="changesrevision">14971e2db055eaecb3b8f0486523f09977d6987b</param>
+    <param 
name="changesrevision">41ea0c132ff4ab72526347240290bac2578d7b7f</param>
   </service>
 </servicedata>

++++++ openSUSE-release-tools-20190828.14971e2d.obscpio -> 
openSUSE-release-tools-20190829.e912e9d2.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20190828.14971e2d/obs_operator.py 
new/openSUSE-release-tools-20190829.e912e9d2/obs_operator.py
--- old/openSUSE-release-tools-20190828.14971e2d/obs_operator.py        
2019-08-28 22:34:02.000000000 +0200
+++ new/openSUSE-release-tools-20190829.e912e9d2/obs_operator.py        
2019-08-29 17:40:08.000000000 +0200
@@ -3,6 +3,7 @@
 # kubernetes logs.
 
 import argparse
+import http
 from http.cookies import SimpleCookie
 from http.cookiejar import Cookie, LWPCookieJar
 from http.server import BaseHTTPRequestHandler, HTTPServer
@@ -20,6 +21,12 @@
 from urllib.parse import urlparse
 from urllib.parse import parse_qs
 
+# A cookie with an invalid key is intermittently generated on opensuse.org
+# domain which causes the operator to crash when parsing the cookie. The 
desired
+# cookie is valid, but cannot be utilize due to the exception. As suggested in
+# https://stackoverflow.com/a/47012250, workaround by making EVERYTHING LEGAL!
+http.cookies._is_legal_key = lambda _: True
+
 # Available in python 3.7.
 class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
     pass
@@ -270,7 +277,14 @@
         return command
 
     def handle_package_diff(self, args, query):
-        return ['osc', 'rdiff', args[0], args[1], args[2]]
+        # source_project source_package target_project [target_package] 
[source_revision] [target_revision]
+        command = ['osc', 'rdiff', args[0], args[1], args[2]] # len(args) == 3
+        if len(args) >= 4:
+            command.append(args[3]) # target_package
+        if len(args) >= 5:
+            command.append('--revision')
+            command.append(':'.join(args[4:6]))
+        return command
 
     def handle_request_submit(self, args, query, data):
         command = ['osc', 'sr', args[0], args[1], args[2]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20190828.14971e2d/osc-origin.py 
new/openSUSE-release-tools-20190829.e912e9d2/osc-origin.py
--- old/openSUSE-release-tools-20190828.14971e2d/osc-origin.py  2019-08-28 
22:34:02.000000000 +0200
+++ new/openSUSE-release-tools-20190829.e912e9d2/osc-origin.py  2019-08-29 
17:40:08.000000000 +0200
@@ -350,6 +350,8 @@
 
     return_value = 0
     for package in packages:
+        print('checking for updates to {}...'.format(package))
+
         request_future = origin_update(apiurl, opts.project, package)
         if not request_future:
             continue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20190828.14971e2d/osclib/origin.py 
new/openSUSE-release-tools-20190829.e912e9d2/osclib/origin.py
--- old/openSUSE-release-tools-20190828.14971e2d/osclib/origin.py       
2019-08-28 22:34:02.000000000 +0200
+++ new/openSUSE-release-tools-20190829.e912e9d2/osclib/origin.py       
2019-08-29 17:40:08.000000000 +0200
@@ -577,6 +577,9 @@
             'origin': annotation.get('origin', 'None'),
             'request': request.reqid,
             'state': request.state.name,
+            'source_project': action.src_project,
+            'source_package': action.src_package,
+            'source_revision': action.src_rev,
         })
 
     return history
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20190828.14971e2d/web/origin-manager/main.css 
new/openSUSE-release-tools-20190829.e912e9d2/web/origin-manager/main.css
--- old/openSUSE-release-tools-20190828.14971e2d/web/origin-manager/main.css    
2019-08-28 22:34:02.000000000 +0200
+++ new/openSUSE-release-tools-20190829.e912e9d2/web/origin-manager/main.css    
2019-08-29 17:40:08.000000000 +0200
@@ -30,6 +30,6 @@
   overflow: auto;
 }
 
-#details p {
+#details p, #details pre {
   margin: 20px;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20190828.14971e2d/web/origin-manager/main.js 
new/openSUSE-release-tools-20190829.e912e9d2/web/origin-manager/main.js
--- old/openSUSE-release-tools-20190828.14971e2d/web/origin-manager/main.js     
2019-08-28 22:34:02.000000000 +0200
+++ new/openSUSE-release-tools-20190829.e912e9d2/web/origin-manager/main.js     
2019-08-29 17:40:08.000000000 +0200
@@ -95,6 +95,8 @@
 }
 
 function table_selection_set(table, value) {
+    if (typeof table === 'undefined') return;
+
     if (table.getSelectedRows().length > 0) {
         if (table.getSelectedRows()[0].getIndex() != value) {
             table.getSelectedRows()[0].deselect();
@@ -233,9 +235,13 @@
                 width: 100,
             },
         ],
+        dataLoaded: history_select_set,
+        index: 'request',
         initialSort: [
             { column: 'request', dir: 'desc' },
         ],
+        rowClick: history_select_hash,
+        selectable: 1,
         tooltips: true,
     });
 }
@@ -276,6 +282,7 @@
         return;
     }
     project_table.project = project;
+    project_table.clearData();
     project_table.setData(operator_url() + '/origin/list/' + project, {}, 
FETCH_JSON_CONFIG);
     project_table.setHeaderFilterFocus('package');
 }
@@ -293,13 +300,16 @@
     }
     $('aside').toggle(package != null);
 
+    potential_table.package = package;
+    history_table.package = package;
+
     if (package == null) return;
 
-    potential_table.package = package;
+    potential_table.clearData();
     potential_table.setData(
         operator_url() + '/origin/potentials/' + project + '/' + package, {}, 
FETCH_JSON_CONFIG);
 
-    history_table.package = package;
+    history_table.clearData();
     history_table.setData(
         operator_url() + '/origin/history/' + project + '/' + package, {}, 
FETCH_JSON_CONFIG);
 
@@ -314,34 +324,67 @@
 }
 
 function package_select_hash() {
-    hash_set([project_get(), table_selection_get(project_table),
-             
origin_project(project_table.getSelectedRows()[0].getData()['origin'])]);
+    if (table_selection_get(project_table)) {
+        hash_set([project_get(), table_selection_get(project_table),
+                 
origin_project(project_table.getSelectedRows()[0].getData()['origin'])]);
+    } else {
+        hash_set([project_get()]);
+    }
 }
 
 function potential_get() {
-    return $('#details').data('origin');
+    return hash_get(2);
 }
 
-function potential_set(project, package, origin) {
+function potential_set(project, package, origin, request) {
     if (project == $('#details').data('project') &&
         package == $('#details').data('package') &&
-        origin == potential_get()) return;
+        origin == $('#details').data('origin') &&
+        request == $('#details').data('request')) return;
+
+    var path;
+    if (request != null) {
+        // Unlike a diff between origin and target project a diff between
+        // a request and an origin requires the request source project and
+        // package which are provided along with the history data. As such the
+        // history table must be loaded before the diff can be requested.
+        if (!history_table.getSelectedRows().length) return;
+
+        var request_data = history_table.getSelectedRows()[0].getData();
+        path = [
+            origin,
+            package,
+            request_data['source_project'],
+            request_data['source_package'],
+            'latest',
+            request_data['source_revision'],
+        ].join('/');
+    } else {
+        path = [project, package, origin].join('/');
+    }
 
     $('#details').toggle(origin != null);
     $('#details').data('project', project);
     $('#details').data('package', package);
     $('#details').data('origin', origin);
+    $('#details').data('request', request);
 
+    // At minimum an origin is required, but be sure to toggle element and set
+    // data attributes to handle the next call properly.
     if (origin == null) return;
 
     $('#details').html('<p>Loading...</p>');
-    var url = operator_url() + '/package/diff/' + project + '/' + package + 
'/' + origin;
-    fetch(url, FETCH_CONFIG)
+
+    fetch(operator_url() + '/package/diff/' + path, FETCH_CONFIG)
         .then(response => response.text())
         .then(text => {
             if (text == '') {
                 $('#details').html('<p>No difference</p>');
                 return;
+            } else if (text.startsWith('# diff failed')) {
+                $('#details').html('<p>Failed to generate 
diff</p><pre></pre>');
+                $('#details pre').text(text);
+                return;
             }
             $('#details').html(Diff2Html.getPrettyHtml(text));
         });
@@ -357,7 +400,8 @@
 }
 
 function potential_select_hash() {
-    hash_set([project_get(), package_get(), 
table_selection_get(potential_table)]);
+    hash_set([project_get(), package_get(), 
table_selection_get(potential_table),
+             table_selection_get(history_table)]);
 }
 
 function potential_external(e, cell) {
@@ -400,6 +444,25 @@
         });
 }
 
+function history_get() {
+    return hash_get(3);
+}
+
+function history_select_set() {
+    var request = history_get();
+    if (request) {
+        table_selection_set(history_table, request);
+
+        // Trigger appropriate potential_set() call since waiting for history
+        // data to be available for request diff.
+        hash_changed();
+    }
+}
+
+function history_select_hash() {
+    potential_select_hash();
+}
+
 var title_suffix;
 function hash_init() {
     title_suffix = document.title;
@@ -411,15 +474,35 @@
     return window.location.hash.substr(1).replace(/\/+$/, '').split('/');
 }
 
+function hash_get(index) {
+    var parts = hash_parts();
+    if (parts.length > index) {
+        return parts[index];
+    }
+    return null;
+}
+
 function hash_set(parts) {
+    // Shorten the parts array to before the first null.
+    for (var i = 0; i < parts.length; i++) {
+        if (parts[i] == null) {
+            parts.length = i;
+            break
+        }
+    }
+
     window.location.hash = parts.join('/');
 }
 
 function hash_changed() {
+    // Wait until all tables have been initialized before proceeding.
+    if (typeof history_table === 'undefined') return;
+
     var parts = hash_parts();
     var project = null;
     var package = null;
     var origin = null;
+    var request = null;
 
     // route: /*
     if (parts[0] == '') {
@@ -441,11 +524,17 @@
     if (parts.length >= 3) {
         origin = parts[2];
     }
-    potential_set(project, package, origin);
-    title_update(project, package, origin);
+
+    // route: /:project/:package/:origin/:request
+    if (parts.length >= 4) {
+        request = parts[3];
+    }
+    potential_set(project, package, origin, request);
+
+    title_update(project, package, origin, request);
 }
 
-function title_update(project, package, origin) {
+function title_update(project, package, origin, request) {
     var parts = hash_parts();
     var title = '';
     if (project) {
@@ -454,6 +543,9 @@
     if (package) {
         title += '/' + package;
     }
+    if (request) {
+        title += ' request ' + request;
+    }
     if (origin) {
         title += ' diff against ' + origin;
     }

++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.ZgpdOx/_old  2019-08-30 14:41:47.961418526 +0200
+++ /var/tmp/diff_new_pack.ZgpdOx/_new  2019-08-30 14:41:47.965418526 +0200
@@ -1,5 +1,5 @@
 name: openSUSE-release-tools
-version: 20190828.14971e2d
-mtime: 1567024442
-commit: 14971e2db055eaecb3b8f0486523f09977d6987b
+version: 20190829.e912e9d2
+mtime: 1567093208
+commit: e912e9d2c38be75d5c42a0f15f735b818e7a067f
 


Reply via email to