All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/8] patman: Provide option to ignore bad aliases
Date: Thu, 21 Mar 2013 10:09:18 -0700	[thread overview]
Message-ID: <CAD=FV=U6X+MFi9rMcdF5tt_Yn+3CBw3_SBUDb8fK5PyVs1mczw@mail.gmail.com> (raw)
In-Reply-To: <1363833781-14557-6-git-send-email-sjg@chromium.org>

Simon,

Nothing critical and this could go in as-is, but a few nits below.


On Wed, Mar 20, 2013 at 7:42 PM, Simon Glass <sjg@chromium.org> wrote:
> -        raw += LookupEmail(item, alias)
> +        raw += LookupEmail(item, alias, raise_on_error=not ignore_errors)

optional: Change it so functions are consistent about whether it's
"raise_on_error" or "ignore_errors"


> +    >>> EmailPatches(series, 'cover', ['p1', 'p2'], True, False, 'cc-fname', \
> +            False, alias)

Doctest that actually tests the raise_on_error?  See doctests in
gitutil.py for example syntax.


> -def LookupEmail(lookup_name, alias=None, level=0):
> +def LookupEmail(lookup_name, alias=None, raise_on_error=True, level=0):
>      """If an email address is an alias, look it up and return the full name
>
>      TODO: Why not just use git's own alias feature?
>
>      Args:
>          lookup_name: Alias or email address to look up
> +        alias: Dictionary containing aliases (None to use settings default)
> +        raise_on_error: True to raise an error when an alias fails to match

...and what happens if you pass False?


> +    >>> LookupEmail('odd', alias, False)
> +    \033[1;31mAlias 'odd' not found\033[0m
> +    []
> +    >>> # In this case the loop part will effectively be ignored.
> +    >>> LookupEmail('loop', alias, False)
> +    \033[1;31mRecursive email alias at 'other'\033[0m
> +    \033[1;31mRecursive email alias at 'john'\033[0m
> +    \033[1;31mRecursive email alias at 'mary'\033[0m
> +    ['j.bloggs at napier.co.nz', 'm.poppins at cloud.net']

optional nit: for optional args it's nice to specify them with keywords, like
  >>> LookupEmail('loop', alias=alias, raise_on_error=False)

Please test the raise_on_error=True case.


-Doug

  reply	other threads:[~2013-03-21 17:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21  2:42 [U-Boot] [PATCH 0/8] Various patman fixes Simon Glass
2013-03-21  2:42 ` [U-Boot] [PATCH 1/8] patman: Fix up checkpatch parsing to deal with 'CHECK' lines Simon Glass
2013-03-21 16:35   ` Doug Anderson
2013-03-26 22:12     ` Simon Glass
2013-03-21  2:42 ` [U-Boot] [PATCH 2/8] patman: Don't look for tags inside quotes Simon Glass
2013-03-21 16:50   ` Doug Anderson
2013-03-26 22:14     ` Simon Glass
2013-03-21  2:42 ` [U-Boot] [PATCH 3/8] patman: Minor help message/README fixes Simon Glass
2013-03-21 16:52   ` Doug Anderson
2013-03-21  2:42 ` [U-Boot] [PATCH 4/8] patman: Fix the comment in CheckTags to mention multiple tags Simon Glass
2013-03-21 16:53   ` Doug Anderson
2013-03-21  2:42 ` [U-Boot] [PATCH 5/8] patman: Provide option to ignore bad aliases Simon Glass
2013-03-21 17:09   ` Doug Anderson [this message]
2013-03-26 22:46     ` Simon Glass
2013-03-21  2:42 ` [U-Boot] [PATCH 6/8] patman: Add -a option to refrain from test-applying the patches Simon Glass
2013-03-21 17:12   ` Doug Anderson
2013-03-21  2:43 ` [U-Boot] [PATCH 7/8] patman: Add Cover-letter-cc tag to Cc cover letter to people Simon Glass
2013-03-21  3:46   ` Doug Anderson
2013-03-21  2:43 ` [U-Boot] [PATCH 8/8] patman: Add Series-process-log tag to sort/uniq change logs Simon Glass
2013-03-21 17:51   ` Doug Anderson
2013-03-26 22:15     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD=FV=U6X+MFi9rMcdF5tt_Yn+3CBw3_SBUDb8fK5PyVs1mczw@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.