diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-28 12:00:38 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-28 12:00:38 -0400 |
commit | 5e9931c213685938c79d855856a16ff9131772d5 (patch) | |
tree | b459a24de3bb3d3507e0380235ce1f7110277a75 /b4/__init__.py | |
parent | a926bac9e6c222e1bfe87ce79d925083c5879060 (diff) | |
download | b4-5e9931c213685938c79d855856a16ff9131772d5.tar.gz |
Add --no-cover and -o - to output to stdout
By request, provide a way to output the results of b4 am to stdout. This
way it can be piped straight to "git am".
E.g.:
b4 diff 20200526205322.23465-1-mic@digikod.net -o - | git am
Requested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/__init__.py')
-rw-r--r-- | b4/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/b4/__init__.py b/b4/__init__.py index a462fe9..5858a0d 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -200,7 +200,7 @@ class LoreMailbox: if reused: continue # Try to backfill from that project - tmp_mbox = mkstemp()[1] + tmp_mbox = mkstemp('b4-backfill-mbox')[1] get_pi_thread_by_msgid(patch.msgid, tmp_mbox, useproject=projmap[entry[1]]) mbx = mailbox.mbox(tmp_mbox) was = len(self.msgid_map) @@ -2003,7 +2003,9 @@ def get_pi_thread_by_msgid(msgid, savefile, useproject=None, nocache=False): logger.debug('t_mbx_url=%s', t_mbx_url) logger.critical('Grabbing thread from %s', projurl.split('://')[1]) - in_mbxf = get_pi_thread_by_url(t_mbx_url, '%s-loose' % savefile, nocache=nocache) + + tmp_mbox = mkstemp('b4-lookup-mbox')[1] + in_mbxf = get_pi_thread_by_url(t_mbx_url, tmp_mbox, nocache=nocache) if not in_mbxf: return None in_mbx = mailbox.mbox(in_mbxf) |