Hi Jordan,

I can update the logic.  The loop of supported
version values looks good.

One of the reasons I choose the style I did is that 
this patch is intended to be short lived.  I would
like to see everyone transition to the new agreement
in their commit messages.  I know there are patches 
in progress, so we need a period of time where both
are supported.  I a month or two, I would like to 
require the 1.1 agreement in the commit messages.

Adding flexibility in the compare did not make much
sense if we are going to use one most of the time.

Thanks,

Mike




> -----Original Message-----
> From: Justen, Jordan L
> Sent: Monday, July 17, 2017 3:14 PM
> To: Kinney, Michael D <[email protected]>; edk2-
> [email protected]
> Cc: Leif Lindholm <[email protected]>; Andrew Fish
> <[email protected]>; Gao, Liming <[email protected]>
> Subject: Re: [Patch 1/2] BaseTools/PatchCheck: Support
> Contribution Agreement 1.1
> 
> On 2017-07-17 14:28:28, Michael D Kinney wrote:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=628
> >
> > Update PatchCheck.py to support either
> > "Contributed-under: TianoCore Contribution Agreement 1.0"
> > or "Contributed-under: TianoCore Contribution Agreement 1.1"
> > in the commit message.
> >
> > Cc: Leif Lindholm <[email protected]>
> > Cc: Andrew Fish <[email protected]>
> > Cc: Jordan Justen <[email protected]>
> > Cc: Liming Gao <[email protected]>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Michael D Kinney <[email protected]>
> > ---
> >  BaseTools/Scripts/PatchCheck.py | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/BaseTools/Scripts/PatchCheck.py
> b/BaseTools/Scripts/PatchCheck.py
> > index 7bc5736dbf..135f1c0112 100755
> > --- a/BaseTools/Scripts/PatchCheck.py
> > +++ b/BaseTools/Scripts/PatchCheck.py
> > @@ -77,8 +77,10 @@ class CommitMessageCheck:
> >      def check_contributed_under(self):
> >          cu_msg='Contributed-under: TianoCore Contribution
> Agreement 1.0'
> >          if self.msg.find(cu_msg) < 0:
> > -            self.error('Missing Contributed-under! (Note: this
> must be ' +
> > -                       'added by the code contributor!)')
> > +            cu_msg='Contributed-under: TianoCore Contribution
> Agreement 1.1'
> > +            if self.msg.find(cu_msg) < 0:
> > +                self.error('Missing Contributed-under! (Note:
> this must be ' +
> > +                           'added by the code contributor!)')
> 
> I'd probably try for a regex. Something like:
> 
> '^\s*Contributed-under: TianoCore Contribution Agreement
> 1\.[01]\s*$'
> 
> But you could also do something like:
> 
> for ver in ('1.0', '1.1'):
>     cu_msg='Contributed-under: TianoCore Contribution Agreement '
> + ver
>     ...
>     if found: return
> self.error('Missing Contributed-under! (Note: this must be ' +
>            'added by the code contributor!)')
> 
> -Jordan
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to