aboutsummaryrefslogtreecommitdiff
path: root/b4/mbox.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-05-19 18:21:53 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-05-19 18:21:53 -0400
commit6ca672ed87a6f8812fa408ea0b3161e68ce2351e (patch)
tree4b399a129bb946db45186a3a7b6bd82ae4b58b31 /b4/mbox.py
parentaaf4ae403c5acff9127e81446bb858719d3b120f (diff)
downloadb4-6ca672ed87a6f8812fa408ea0b3161e68ce2351e.tar.gz
Display range-diff by default
Don't make developers do copy-pasting unnecessarily. Switch to outputting the diff by default, with flag options to save to file or just show what needs to be done. Additionally, adds caching to lookups and remember previously generated fake-am ranges so we don't continuously generate loose objects on repeat runs. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/mbox.py')
-rw-r--r--b4/mbox.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index 9ff88a6..e03ef6c 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -310,7 +310,7 @@ def am_mbox_to_quilt(am_mbx, q_dirname):
sfh.write('%s\n' % patch_filename)
-def get_extra_series(mboxfile, direction=1, wantvers=None):
+def get_extra_series(mboxfile, direction=1, wantvers=None, nocache=False):
# Open the mbox and find the latest series mentioned in it
mbx = mailbox.mbox(mboxfile)
base_msg = None
@@ -415,7 +415,7 @@ def get_extra_series(mboxfile, direction=1, wantvers=None):
continue
t_mbx_url = '%st.mbox.gz' % link
savefile = mkstemp('b4-get')[1]
- nt_mboxfile = b4.get_pi_thread_by_url(t_mbx_url, savefile)
+ nt_mboxfile = b4.get_pi_thread_by_url(t_mbx_url, savefile, nocache=nocache)
nt_mbx = mailbox.mbox(nt_mboxfile)
# Append all of these to the existing mailbox
new_adds = 0