diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-19 18:21:53 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-19 18:21:53 -0400 |
commit | 6ca672ed87a6f8812fa408ea0b3161e68ce2351e (patch) | |
tree | 4b399a129bb946db45186a3a7b6bd82ae4b58b31 /b4/mbox.py | |
parent | aaf4ae403c5acff9127e81446bb858719d3b120f (diff) | |
download | b4-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.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |