details:   https://code.tryton.org/tools/maintenance/commit/eddf61678529
branch:    default
user:      Cédric Krier <[email protected]>
date:      Sat Mar 14 12:29:06 2026 +0100
description:
        Match email when updating copyright
diffstat:

 update_copyright |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (29 lines):

diff -r 9ed9e0b161c1 -r eddf61678529 update_copyright
--- a/update_copyright  Sat Mar 21 09:14:38 2026 +0100
+++ b/update_copyright  Sat Mar 14 12:29:06 2026 +0100
@@ -17,6 +17,7 @@
 
 # Retrieve the names and companies from mercurial
 names = set()
+emails = set()
 companies = set()
 start_date = dt.date(dt.datetime.now(dt.timezone.utc).year, 1, 1)
 branch = subprocess.check_output(
@@ -29,6 +30,7 @@
     _, name = line.split(' ', 1)
     name = name.strip()
     email, = re_email.findall(name)
+    emails.add(email.strip().lower())
     _, company = email.split('@', 1)
     company, _ = company.rsplit('.', 1)
     companies.add(company.strip().lower())
@@ -52,6 +54,9 @@
     if not line.startswith('Copyright'):
         return line
     lower_line = line.lower()
+    for email in emails:
+        if email in lower_line:
+            return increase_year(line)
     # Check if name match
     for name in names:
         if name in lower_line:

Reply via email to