Merge branch 'master' into u-boot
PATCH 1/2 Merge branch 'master' into u-boot
Bring us up to commit 0b8875225750 ("Allow multiple spaces within an email address") of the upstream gitdm project.
---
So this isn't a real patch exactly. This shows what the single merge error would need to be corrected as, in order to bring our tree up to the above commit from upstream. That in turn is just doing a python3 print() rather than python2 print in the error case where we try and further correct the Funky email addresses we have, in code that was already clearly marked as local only code. The rest of those changes moved in cleanly.
database.py +0 -0
@@@ -296,56 -315,20 +315,56 @@@ def AddEmailEmployerMapping(email, empl except KeyError: EmailToEmployer[email] = [(end, empl)] +##!!wd!! +FunkyToEmail = { + # + # Known corrupted addresses. + # + 'bnemec <at': '[email protected]', + 'ch.naveen.samsung.com': '[email protected]', + 'graeme.russ at gmail.com': '[email protected]', + 'h.rohit at samsung.com': '[email protected]', + 'hskinnemoen <at': '[email protected]', + 'kazuichi at fsi.co.jp': '[email protected]', + 'notasas at': '[email protected]', + 'phdm at macqel.be': '[email protected]', + 'plagnioj <at': '[email protected]', + 'plagnioj <at> jcrosoft.com': '[email protected]', + 'plagnioj at': '[email protected]', + 'richardretanubun at ruggedcom.com': '[email protected]', + 'scn1874 at yandex.ru': '[email protected]', + 'stelian <at': '[email protected]', + 'steve.sakomanlinaro.org': '[email protected]', + 'tomasz.figa_at_gmail.com': '[email protected]', + 'w.wegner at astro-kom.de': '[email protected]', + 'v-stehle <at': '[email protected]', + 'kotnes <at': '[email protected]', +}; +# 'kotnes <at> cisco <dot> com': '[email protected]', +##!!wd!! + - def MapToEmployer (email, unknown = 0): + def MapToEmployer(email, unknown = 0): # Somebody sometimes does s/@/ at /; let's fix it. - email = email.lower ().replace (' at ', '@') + email = email.lower().replace(' at ', '@') try: return EmailToEmployer[email] except KeyError: pass - namedom = email.split ('@') - if len (namedom) < 2: - print 'Oops...funky email %s' % email + namedom = email.split('@') + if len(namedom) < 2: + print('Oops...funky email %s' % email) + ##!!wd!! + try: + email = FunkyToEmail[email] - print ' ... fixed up to %s' % email ++ print(' ... fixed up to %s' % email) + namedom = email.split ('@') + except KeyError: + return [(nextyear, GetEmployer ('Funky'))] + ##!!wd!! - return [(nextyear, GetEmployer ('Funky'))] - s = namedom[1].split ('.') - for dots in range (len (s) - 2, -1, -1): - addr = '.'.join (s[dots:]) + return [(nextyear, GetEmployer('Funky'))] + s = namedom[1].split('.') + for dots in range(len(s) - 2, -1, -1): + addr = '.'.join(s[dots:]) try: return EmailToEmployer[addr] except KeyError:
PATCH 2/2 logparser.py: Try and be more robust with unicode handling
Given the sometimes oddly formatted data that can come through when removing code, we need to be as flexible as possible when handling it. Set our encoding to unicode_escape and if we still run in to a problem, it's likely going to be OK to ignore it.
---
I've emailed this to Jonathan Corbet as well as he's the upstream for the project, and this does work for me. But I'm not a python guru by any means. But trying to run the stats for v2022.04..v2022.07-rc6 blows up in places otherwise.
logparser.py | 1 + 1 file changed, 1 insertion(+)
logparser.py +1 -0
@@ -37,6 +37,7 @@ class LogPatchSplitter: self.fd = fd self.buffer = None self.patch = [] + sys.stdin.reconfigure(encoding='unicode_escape', errors='ignore') def __iter__(self): return self
Signature · 1 line
2.25.1
Re: [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling
Quoted 7 lines · Tom Rini
Given the sometimes oddly formatted data that can come through when removing code, we need to be as flexible as possible when handling it. Set our encoding to
unicode_escapeand if we still run in to a problem, it's likely going to be OK to ignore it.Signed-off-by Tom Rini <[email protected]>
Quoted 8 lines
---
I've emailed this to Jonathan Corbet as well as he's the upstream for the project, and this does work for me. But I'm not a python guru by any means. But trying to run the stats for v2022.04..v2022.07-rc6 blows up in places otherwise.logparser.py | 1 + 1 file changed, 1 insertion(+)
BTW I have found that using binary is helpful in many places, the convert to UTF-8 when displaying things.
Quoted 16 lines
logparser.py +1
-1@@ -37,6 +37,7 @@ class LogPatchSplitter: self.fd = fd self.buffer = None self.patch = [] + sys.stdin.reconfigure(encoding='unicode_escape', errors='ignore') def __iter__(self): return self --2.25.1
Re: [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling
Quoted 34 lines · Simon Glass
Quoted 7 lines · Tom Rini
Given the sometimes oddly formatted data that can come through when removing code, we need to be as flexible as possible when handling it. Set our encoding to
unicode_escapeand if we still run in to a problem, it's likely going to be OK to ignore it.Signed-off-by Tom Rini <[email protected]>Quoted 8 lines
---
I've emailed this to Jonathan Corbet as well as he's the upstream for the project, and this does work for me. But I'm not a python guru by any means. But trying to run the stats for v2022.04..v2022.07-rc6 blows up in places otherwise.logparser.py | 1 + 1 file changed, 1 insertion(+)Reviewed-by Simon Glass <[email protected]>BTW I have found that using binary is helpful in many places, the convert to UTF-8 when displaying things.
Quoted 11 lines
logparser.py +1
-0@@ -37,6 +37,7 @@ class LogPatchSplitter: self.fd = fd self.buffer = None self.patch = [] + sys.stdin.reconfigure(encoding='unicode_escape', errors='ignore')
Quoted 2 lines
logparser.py class LogPatchSplitter: · line 43
Quoted 2 lines
logparser.py +0
-0def __iter__(self): return self
So, I followed up with Jonathan, but hadn't yet for the list. unicode_escape works, but then the results don't read right. It turned out utf-8 was the right encoding, but the first time I tried testing it I had some other problem locally.
Signature · 1 line
Tom
Quoted 6 lines · Tom Rini
Bring us up to commit
0b8875225750("Allow multiple spaces within an email address") of the upstream gitdm project.Signed-off-by Tom Rini <[email protected]>
Quoted 8 lines
---
So this isn't a real patch exactly. This shows what the single merge error would need to be corrected as, in order to bring our tree up to the above commit from upstream. That in turn is just doing a python3print()rather than python2 print in the error case where we try and further correct the Funky email addresses we have, in code that was already clearly marked as local only code. The rest of those changes moved in cleanly.