summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-20 16:41:41 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-03-20 16:41:41 -0400
commit38657d271b64d604ed7a3ae57f3c3f0cf695b065 (patch)
treee806e289865f904dd7b69f1e3b3541845aef3632
parent0f63a3f6a7398321bd799c7b778e0e721c811287 (diff)
downloadb4-38657d271b64d604ed7a3ae57f3c3f0cf695b065.tar.gz
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 <konstantin@linuxfoundation.org>
-rw-r--r--b4/command.py4
-rw-r--r--b4/mbox.py4
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: