From 38657d271b64d604ed7a3ae57f3c3f0cf695b065 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 20 Mar 2020 16:41:41 -0400 Subject: Force nocache if we're running with -c Checking for newer versions always requires going out to lore.kernel.org, so force nocache operation. Signed-off-by: Konstantin Ryabitsev --- b4/command.py | 4 ++-- b4/mbox.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/b4/command.py b/b4/command.py index eca416d..c2dc2b0 100644 --- a/b4/command.py +++ b/b4/command.py @@ -26,6 +26,8 @@ def cmd_mbox_common_opts(sp): help='Filename to name the mbox file') sp.add_argument('-m', '--use-local-mbox', dest='localmbox', default=None, help='Instead of grabbing a thread from lore, process this mbox file') + sp.add_argument('-C', '--no-cache', dest='nocache', action='store_true', default=False, + help='Do not use local cache') def cmd_mbox(cmdargs): @@ -71,8 +73,6 @@ def cmd(): cmd_mbox_common_opts(sp_am) sp_am.add_argument('-v', '--use-version', dest='wantver', type=int, default=None, help='Get a specific version of the patch/series') - sp_am.add_argument('-C', '--no-cache', dest='nocache', action='store_true', default=False, - help='Do not use local cache') sp_am.add_argument('-t', '--apply-cover-trailers', dest='covertrailers', action='store_true', default=False, help='Apply trailers sent to the cover letter to all patches') sp_am.add_argument('-T', '--no-add-trailers', dest='noaddtrailers', action='store_true', default=False, diff --git a/b4/mbox.py b/b4/mbox.py index ccd15ed..f4ae178 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -358,6 +358,10 @@ def get_newest_series(mboxfile): def main(cmdargs): + if cmdargs.checknewer: + # Force nocache mode + cmdargs.nocache = True + config = b4.get_main_config() if not cmdargs.localmbox: -- cgit v1.2.3