aboutsummaryrefslogtreecommitdiff
path: root/b4/pr.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-12-14 13:58:42 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-12-14 13:58:42 -0500
commitb860e96fe695b73fde356da72ec70172189fbff7 (patch)
treeec8edfa132f2c5eeff41379213ea5bf63b130fd7 /b4/pr.py
parent4e396d2091fe70d2217865a1836695e00b5067f2 (diff)
downloadb4-b860e96fe695b73fde356da72ec70172189fbff7.tar.gz
Allow passing extra opts to git-format-patch
We probably want to be able to tweak the output of git-format-patch based on which list we're running it for (e.g. passing --minimal or --histogram), so make it possible to pass extra parameters to the git command. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/pr.py')
-rw-r--r--b4/pr.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/b4/pr.py b/b4/pr.py
index ef390a2..e31afc1 100644
--- a/b4/pr.py
+++ b/b4/pr.py
@@ -239,7 +239,7 @@ def thanks_record_pr(lmsg):
logger.debug('Wrote %s for thanks tracking', filename)
-def explode(gitdir, lmsg, mailfrom=None, retrieve_links=True):
+def explode(gitdir, lmsg, mailfrom=None, retrieve_links=True, fpopts=None):
ecode = fetch_remote(gitdir, lmsg, check_sig=False, ty_track=False)
if ecode > 0:
sys.exit(ecode)
@@ -290,7 +290,7 @@ def explode(gitdir, lmsg, mailfrom=None, retrieve_links=True):
# of the archived threads.
linked_ids.add(lmsg.msgid)
- with b4.git_format_patches(gitdir, lmsg.pr_base_commit, 'FETCH_HEAD', prefixes=prefixes) as pdir:
+ with b4.git_format_patches(gitdir, lmsg.pr_base_commit, 'FETCH_HEAD', prefixes=prefixes, extraopts=fpopts) as pdir:
if pdir is None:
sys.exit(1)
@@ -374,6 +374,9 @@ def explode(gitdir, lmsg, mailfrom=None, retrieve_links=True):
seen_msgids = set()
for msgid in linked_ids:
+ # Did we already retrieve it as part of a previous tread?
+ if msgid in seen_msgids:
+ continue
savefile = mkstemp()[1]
mboxfile = b4.get_pi_thread_by_msgid(msgid, savefile)
if mboxfile is not None: