[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 8 17:34:33 UTC 2021


 esc-reporting/esc-analyze.py |   36 +++++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)

New commits:
commit b04d229048177c4bf7d62404c6fe09a95da10e6f
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Mar 8 18:32:07 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Mar 8 18:32:07 2021 +0100

    esc-analyze: Check gerrit patches older than a week
    
    or which parents are older than a week
    
    Change-Id: Iebba269a715dbee1745bad21d794c495e1d47e4f

diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index f84009e..a306323 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -643,6 +643,7 @@ def analyze_reports():
     automateList = util_load_data_file(fileAutomate)
     automateList['gerrit']['to_abandon_abandon'] = {}
     automateList['gerrit']['to_abandon_comment'] = {}
+    automateList['gerrit']['old_parent'] = {}
     automateList['gerrit']['to_review'] = {}
     automateList['bugzilla']['missing_cc'] = {}
     automateList['bugzilla']['remove_cc'] = {}
@@ -711,11 +712,6 @@ def analyze_reports():
                 statList['reportList']['abandonedPatches'].append(x)
 
       if row['status'] == 'NEW':
-        cntReview = 0
-        for x1 in 'Code-Review', 'Verified':
-          for x in row['labels'][x1]['all']:
-            if x['email'] != ownerEmail:
-              cntReview += 1
 
         x = len(row['messages']) - 1
         if x >= 0:
@@ -725,6 +721,31 @@ def analyze_reports():
           patchset = 1
           txt = ''
 
+        cntReview = 0
+        for x1 in 'Code-Review', 'Verified':
+          for x in row['labels'][x1]['all']:
+            if x['email'] != ownerEmail:
+              cntReview += 1
+
+            if row['branch'] == 'master' and x['name'] == "Jenkins" and x['value'] == 1:
+              bIsOneWeekOld = False
+              verificationDate = datetime.datetime.strptime(x['date'], '%Y-%m-%d %H:%M:%S.%f000')
+              if verificationDate < cfg['1weekDate']:
+                bIsOneWeekOld = True
+              else:
+                currentRevision = row['current_revision']
+                parentId = row['revisions'][currentRevision]['commit']['parents'][0]['commit']
+                parentIdName = "core_" + parentId
+                if parentIdName in gitData['commits']:
+                  parentIdInfo = gitData['commits'][parentIdName]
+
+                  xParentDate = datetime.datetime.strptime(parentIdInfo['date'], "%Y-%m-%d %H:%M:%S")
+                  if xParentDate < cfg['1weekDate']:
+                    bIsOneWeekOld = True
+
+              if bIsOneWeekOld:
+                automateList['gerrit']['old_parent'][entry['id']] = patchset
+
         if xDate < cfg['1monthDate']:
           # gerrit cli sucks and doesn't accept changeset,patchrev but only uses numericID
           if 'A polite ping' in txt:
commit 61c56dc12baf615ccd39ae85008ee14ef2c042e2
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Mar 8 16:25:18 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Mar 8 16:25:18 2021 +0100

    esc-analyze: abandon patches even if they have a -2
    
    Change-Id: Ic300a9ddb71bc52e219321d91ecb5bd9f436b64c

diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index 1176c32..f84009e 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -711,13 +711,10 @@ def analyze_reports():
                 statList['reportList']['abandonedPatches'].append(x)
 
       if row['status'] == 'NEW':
-        doBlock = False
         cntReview = 0
         for x1 in 'Code-Review', 'Verified':
           for x in row['labels'][x1]['all']:
-            if x['value'] == -2:
-              doBlock = True
-            if x['email'] != ownerEmail and x['email'] != 'ci at libreoffice.org':
+            if x['email'] != ownerEmail:
               cntReview += 1
 
         x = len(row['messages']) - 1
@@ -728,7 +725,7 @@ def analyze_reports():
           patchset = 1
           txt = ''
 
-        if xDate < cfg['1monthDate'] and not doBlock:
+        if xDate < cfg['1monthDate']:
           # gerrit cli sucks and doesn't accept changeset,patchrev but only uses numericID
           if 'A polite ping' in txt:
             automateList['gerrit']['to_abandon_abandon'][entry['id']] = patchset


More information about the Libreoffice-commits mailing list