u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [gitdm PATCH 1/2] Merge branch 'master' into u-boot
@ 2022-07-07 19:22 Tom Rini
  2022-07-07 19:22 ` [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling Tom Rini
  2022-07-12 10:58 ` [gitdm PATCH 1/2] Merge branch 'master' into u-boot Simon Glass
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Rini @ 2022-07-07 19:22 UTC (permalink / raw)
  To: u-boot; +Cc: wd

Bring us up to commit 0b8875225750 ("Allow multiple spaces within an
email address") of the upstream gitdm project.
    
Signed-off-by: Tom Rini <trini@konsulko.com>

--- 
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.

diff --cc database.py
index f356f298c7ed,b50b70cac378..6c43dd23f55e
--- a/database.py
+++ b/database.py
@@@ -296,56 -315,20 +315,56 @@@ def AddEmailEmployerMapping(email, empl
      except KeyError:
          EmailToEmployer[email] = [(end, empl)]
  
 +##!!wd!!
 +FunkyToEmail = {
 +    #
 +    # Known corrupted addresses.
 +    #
 +    'bnemec <at': 'bnemec@ganssloser.com',
 +    'ch.naveen.samsung.com': 'ch.naveen@samsung.com',
 +    'graeme.russ at gmail.com': 'graeme.russ@gmail.com',
 +    'h.rohit at samsung.com': 'h.rohit@samsung.com',
 +    'hskinnemoen <at': 'hskinnemoen@atmel.com',
 +    'kazuichi at fsi.co.jp': 'kazuichi@fsi.co.jp',
 +    'notasas at': 'notasas@gmail.com',
 +    'phdm at macqel.be': 'phdm@macqel.be',
 +    'plagnioj <at': 'plagnioj@jcrosoft.com',
 +    'plagnioj <at> jcrosoft.com': 'plagnioj@jcrosoft.com',
 +    'plagnioj at': 'plagnioj@jcrosoft.com',
 +    'richardretanubun at ruggedcom.com': 'richardretanubun@ruggedcom.com',
 +    'scn1874 at yandex.ru': 'scn1874@yandex.ru',
 +    'stelian <at': 'stelian@popies.net',
 +    'steve.sakomanlinaro.org': 'steve.sakoman@linaro.org',
 +    'tomasz.figa_at_gmail.com': 'tomasz.figa@gmail.com',
 +    'w.wegner at astro-kom.de': 'w.wegner@astro-kom.de',
 +    'v-stehle <at': 'v-stehle@ti.com',
 +    'kotnes <at': 'kotnes@cisco.com',
 +};
 +#    'kotnes <at> cisco <dot> com': 'kotnes@cisco.com',
 +##!!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:

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling
  2022-07-07 19:22 [gitdm PATCH 1/2] Merge branch 'master' into u-boot Tom Rini
@ 2022-07-07 19:22 ` Tom Rini
  2022-07-12 10:58   ` Simon Glass
  2022-07-12 10:58 ` [gitdm PATCH 1/2] Merge branch 'master' into u-boot Simon Glass
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2022-07-07 19:22 UTC (permalink / raw)
  To: u-boot; +Cc: wd

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.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
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(+)

diff --git a/logparser.py b/logparser.py
index efbc72f868eb..d5906e97689d 100644
--- a/logparser.py
+++ b/logparser.py
@@ -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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [gitdm PATCH 1/2] Merge branch 'master' into u-boot
  2022-07-07 19:22 [gitdm PATCH 1/2] Merge branch 'master' into u-boot Tom Rini
  2022-07-07 19:22 ` [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling Tom Rini
@ 2022-07-12 10:58 ` Simon Glass
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Glass @ 2022-07-12 10:58 UTC (permalink / raw)
  To: Tom Rini; +Cc: U-Boot Mailing List, Wolfgang Denk

On Thu, 7 Jul 2022 at 13:22, Tom Rini <trini@konsulko.com> wrote:
>
> Bring us up to commit 0b8875225750 ("Allow multiple spaces within an
> email address") of the upstream gitdm project.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
>
> ---
> 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.

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling
  2022-07-07 19:22 ` [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling Tom Rini
@ 2022-07-12 10:58   ` Simon Glass
  2022-07-12 11:05     ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2022-07-12 10:58 UTC (permalink / raw)
  To: Tom Rini; +Cc: U-Boot Mailing List, Wolfgang Denk

On Thu, 7 Jul 2022 at 13:22, Tom Rini <trini@konsulko.com> wrote:
>
> 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.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> 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 <sjg@chromium.org>

BTW I have found that using binary is helpful in many places, the
convert to UTF-8 when displaying things.


>
> diff --git a/logparser.py b/logparser.py
> index efbc72f868eb..d5906e97689d 100644
> --- a/logparser.py
> +++ b/logparser.py
> @@ -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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling
  2022-07-12 10:58   ` Simon Glass
@ 2022-07-12 11:05     ` Tom Rini
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2022-07-12 11:05 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List, Wolfgang Denk

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

On Tue, Jul 12, 2022 at 04:58:46AM -0600, Simon Glass wrote:
> On Thu, 7 Jul 2022 at 13:22, Tom Rini <trini@konsulko.com> wrote:
> >
> > 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.
> >
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> > 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 <sjg@chromium.org>
> 
> BTW I have found that using binary is helpful in many places, the
> convert to UTF-8 when displaying things.
> 
> 
> >
> > diff --git a/logparser.py b/logparser.py
> > index efbc72f868eb..d5906e97689d 100644
> > --- a/logparser.py
> > +++ b/logparser.py
> > @@ -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

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.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-12 11:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 19:22 [gitdm PATCH 1/2] Merge branch 'master' into u-boot Tom Rini
2022-07-07 19:22 ` [gitdm PATCH 2/2] logparser.py: Try and be more robust with unicode handling Tom Rini
2022-07-12 10:58   ` Simon Glass
2022-07-12 11:05     ` Tom Rini
2022-07-12 10:58 ` [gitdm PATCH 1/2] Merge branch 'master' into u-boot Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).