Hello community,

here is the log from the commit of package b4 for openSUSE:Factory checked in 
at 2020-06-15 20:32:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/b4 (Old)
 and      /work/SRC/openSUSE:Factory/.b4.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "b4"

Mon Jun 15 20:32:56 2020 rev:2 rq:814692 version:0.5.0+git20200528.g204416b80fbb

Changes:
--------
--- /work/SRC/openSUSE:Factory/b4/b4.changes    2020-05-28 09:15:03.304696268 
+0200
+++ /work/SRC/openSUSE:Factory/.b4.new.3606/b4.changes  2020-06-15 
20:32:59.970903089 +0200
@@ -1,0 +2,7 @@
+Mon Jun 08 10:57:26 UTC 2020 - [email protected]
+
+- Update to version 0.5.0+git20200528.g204416b80fbb:
+  * Don't output git am suggestion for -o -
+  * Add --no-cover and -o - to output to stdout
+
+-------------------------------------------------------------------

Old:
----
  b4-0.5.0+git20200526.ga926bac9e6c2.tar.xz

New:
----
  b4-0.5.0+git20200528.g204416b80fbb.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ b4.spec ++++++
--- /var/tmp/diff_new_pack.iiOeHx/_old  2020-06-15 20:33:00.602905357 +0200
+++ /var/tmp/diff_new_pack.iiOeHx/_new  2020-06-15 20:33:00.606905372 +0200
@@ -17,14 +17,14 @@
 
 
 %define skip_python2 1
-%define version_unconverted 0.5.0+git20200526.ga926bac9e6c2
+%define version_unconverted 0.5.0+git20200528.g204416b80fbb
 Name:           b4
-Version:        0.5.0+git20200526.ga926bac9e6c2
+Version:        0.5.0+git20200528.g204416b80fbb
 Release:        0
 Summary:        Helper scripts for kernel.org patches
 License:        GPL-2.0-or-later
-URL:            https://git.kernel.org/pub/scm/utils/b4/b4.git
 Group:          Development/Tools/Other
+URL:            https://git.kernel.org/pub/scm/utils/b4/b4.git
 Source0:        %{name}-%{version}.tar.xz
 BuildArch:      noarch
 BuildRequires:  %{python_module setuptools}

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.iiOeHx/_old  2020-06-15 20:33:00.642905501 +0200
+++ /var/tmp/diff_new_pack.iiOeHx/_new  2020-06-15 20:33:00.642905501 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">git://git.kernel.org/pub/scm/utils/b4/b4.git</param>
-              <param 
name="changesrevision">a926bac9e6c222e1bfe87ce79d925083c5879060</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">204416b80fbb5853d87e6a7cfbf35a0a719c4516</param></service></servicedata>
\ No newline at end of file

++++++ b4-0.5.0+git20200526.ga926bac9e6c2.tar.xz -> 
b4-0.5.0+git20200528.g204416b80fbb.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/__init__.py 
new/b4-0.5.0+git20200528.g204416b80fbb/b4/__init__.py
--- old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/__init__.py       2020-05-26 
14:40:29.000000000 +0200
+++ new/b4-0.5.0+git20200528.g204416b80fbb/b4/__init__.py       2020-05-28 
18:12:16.000000000 +0200
@@ -200,7 +200,7 @@
                 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 @@
     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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/command.py 
new/b4-0.5.0+git20200528.g204416b80fbb/b4/command.py
--- old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/command.py        2020-05-26 
14:40:29.000000000 +0200
+++ new/b4-0.5.0+git20200528.g204416b80fbb/b4/command.py        2020-05-28 
18:12:16.000000000 +0200
@@ -17,7 +17,7 @@
     sp.add_argument('msgid', nargs='?',
                     help='Message ID to process, or pipe a raw message')
     sp.add_argument('-o', '--outdir', default='.',
-                    help='Output into this directory')
+                    help='Output into this directory (or use - to output 
mailbox contents to stdout)')
     sp.add_argument('-p', '--use-project', dest='useproject', default=None,
                     help='Use a specific project instead of guessing 
(linux-mm, linux-hardening, etc)')
     sp.add_argument('-c', '--check-newer-revisions', dest='checknewer', 
action='store_true', default=False,
@@ -111,6 +111,8 @@
     sp_am.add_argument('-3', '--prep-3way', dest='threeway', 
action='store_true', default=False,
                        help='Prepare for a 3-way merge '
                             '(tries to ensure that all index blobs exist by 
making a fake commit range)')
+    sp_am.add_argument('--no-cover', dest='nocover', action='store_true', 
default=False,
+                       help='Do not save the cover letter (on by default when 
using -o -)')
     sp_am.set_defaults(func=cmd_am)
 
     # b4 attest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/diff.py 
new/b4-0.5.0+git20200528.g204416b80fbb/b4/diff.py
--- old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/diff.py   2020-05-26 
14:40:29.000000000 +0200
+++ new/b4-0.5.0+git20200528.g204416b80fbb/b4/diff.py   2020-05-28 
18:12:16.000000000 +0200
@@ -57,7 +57,7 @@
         lmbx.add_message(msg)
 
     mbx.close()
-    os.unlink(mboxfile)
+    os.unlink(savefile)
 
     if wantvers and len(wantvers) == 1:
         upper = max(lmbx.series.keys())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/mbox.py 
new/b4-0.5.0+git20200528.g204416b80fbb/b4/mbox.py
--- old/b4-0.5.0+git20200526.ga926bac9e6c2/b4/mbox.py   2020-05-26 
14:40:29.000000000 +0200
+++ new/b4-0.5.0+git20200528.g204416b80fbb/b4/mbox.py   2020-05-28 
18:12:16.000000000 +0200
@@ -15,6 +15,7 @@
 import time
 import json
 import fnmatch
+import shutil
 
 import urllib.parse
 import xml.etree.ElementTree
@@ -29,6 +30,8 @@
 def mbox_to_am(mboxfile, cmdargs):
     config = b4.get_main_config()
     outdir = cmdargs.outdir
+    if outdir == '-':
+        cmdargs.nocover = True
     wantver = cmdargs.wantver
     wantname = cmdargs.wantname
     covertrailers = cmdargs.covertrailers
@@ -60,11 +63,16 @@
         slug = lser.get_slug(extended=True)
         gitbranch = lser.get_slug(extended=False)
 
-    am_filename = os.path.join(outdir, '%s.mbx' % slug)
-    am_cover = os.path.join(outdir, '%s.cover' % slug)
+    if outdir != '-':
+        am_filename = os.path.join(outdir, '%s.mbx' % slug)
+        am_cover = os.path.join(outdir, '%s.cover' % slug)
 
-    if os.path.exists(am_filename):
-        os.unlink(am_filename)
+        if os.path.exists(am_filename):
+            os.unlink(am_filename)
+    else:
+        # Create a temporary file that we will remove later
+        am_filename = mkstemp('b4-am-stdout')[1]
+        am_cover = None
 
     logger.info('---')
     if cmdargs.cherrypick:
@@ -96,6 +104,7 @@
             cherrypick = list(b4.parse_int_range(cmdargs.cherrypick, 
upper=len(lser.patches)-1))
     else:
         cherrypick = None
+
     logger.critical('Writing %s', am_filename)
     mbx = mailbox.mbox(am_filename)
     am_mbx = lser.save_am_mbox(mbx, noaddtrailers=cmdargs.noaddtrailers,
@@ -144,7 +153,7 @@
     if not lser.complete:
         logger.critical('WARNING: Thread incomplete!')
 
-    if lser.has_cover:
+    if lser.has_cover and not cmdargs.nocover:
         lser.save_cover(am_cover)
 
     top_msgid = None
@@ -179,7 +188,8 @@
     if base_commit:
         logger.critical(' Base: %s', base_commit)
         logger.critical('       git checkout -b %s %s', gitbranch, base_commit)
-        logger.critical('       git am %s', am_filename)
+        if cmdargs.outdir != '-':
+            logger.critical('       git am %s', am_filename)
     else:
         cleanmsg = ''
         if topdir is not None:
@@ -215,12 +225,17 @@
                             cleanmsg = ' (best guess: %s)' % tag
 
         logger.critical(' Base: not found%s', cleanmsg)
-        logger.critical('       git am %s', am_filename)
+        if cmdargs.outdir != '-':
+            logger.critical('       git am %s', am_filename)
 
     am_mbx.close()
-    thanks_record_am(lser, cherrypick=cherrypick)
+    if cmdargs.outdir == '-':
+        logger.info('---')
+        with open(am_filename, 'r') as fh:
+            shutil.copyfileobj(fh, sys.stdout)
+        os.unlink(am_filename)
 
-    return am_filename
+    thanks_record_am(lser, cherrypick=cherrypick)
 
 
 def thanks_record_am(lser, cherrypick=None):
@@ -461,7 +476,9 @@
         msgid = b4.get_msgid(cmdargs)
         wantname = cmdargs.wantname
         outdir = cmdargs.outdir
-        if wantname:
+        if outdir == '-':
+            savefile = mkstemp('b4-mbox')[1]
+        elif wantname:
             savefile = os.path.join(outdir, wantname)
         else:
             # Save it into msgid.mbox
@@ -493,3 +510,9 @@
         mbx = mailbox.mbox(threadmbox)
         logger.critical('Saved %s', threadmbox)
         logger.critical('%s messages in the thread', len(mbx))
+        mbx.close()
+        if cmdargs.outdir == '-':
+            logger.info('---')
+            with open(threadmbox, 'r') as fh:
+                shutil.copyfileobj(fh, sys.stdout)
+            os.unlink(threadmbox)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.5.0+git20200526.ga926bac9e6c2/man/b4.5 
new/b4-0.5.0+git20200528.g204416b80fbb/man/b4.5
--- old/b4-0.5.0+git20200526.ga926bac9e6c2/man/b4.5     2020-05-26 
14:40:29.000000000 +0200
+++ new/b4-0.5.0+git20200528.g204416b80fbb/man/b4.5     2020-05-28 
18:12:16.000000000 +0200
@@ -86,11 +86,10 @@
 show this help message and exit
 .TP
 .BI \-o \ OUTDIR\fP,\fB \ \-\-outdir \ OUTDIR
-Output into this directory
+Output into this directory (or use \- to output mailbox contents to stdout)
 .TP
 .BI \-p \ USEPROJECT\fP,\fB \ \-\-use\-project \ USEPROJECT
-Use a specific project instead of guessing (linux\-mm,
-linux\-hardening, etc)
+Use a specific project instead of guessing (linux\-mm, linux\-hardening, etc)
 .TP
 .B \-c\fP,\fB  \-\-check\-newer\-revisions
 Check if newer patch revisions exist
@@ -99,8 +98,7 @@
 Filename to name the mbox file
 .TP
 .BI \-m \ LOCALMBOX\fP,\fB \ \-\-use\-local\-mbox \ LOCALMBOX
-Instead of grabbing a thread from lore, process this
-mbox file
+Instead of grabbing a thread from lore, process this mbox file
 .TP
 .B \-C\fP,\fB  \-\-no\-cache
 Do not use local cache
@@ -124,11 +122,10 @@
 show this help message and exit
 .TP
 .BI \-o \ OUTDIR\fP,\fB \ \-\-outdir \ OUTDIR
-Output into this directory
+Output into this directory (or use \- to output mailbox contents to stdout)
 .TP
 .BI \-p \ USEPROJECT\fP,\fB \ \-\-use\-project \ USEPROJECT
-Use a specific project instead of guessing (linux\-mm,
-linux\-hardening, etc)
+Use a specific project instead of guessing (linux\-mm, linux\-hardening, etc)
 .TP
 .B \-c\fP,\fB  \-\-check\-newer\-revisions
 Check if newer patch revisions exist
@@ -137,8 +134,7 @@
 Filename to name the mbox file
 .TP
 .BI \-m \ LOCALMBOX\fP,\fB \ \-\-use\-local\-mbox \ LOCALMBOX
-Instead of grabbing a thread from lore, process this
-mbox file
+Instead of grabbing a thread from lore, process this mbox file
 .TP
 .B \-C\fP,\fB  \-\-no\-cache
 Do not use local cache
@@ -165,16 +161,16 @@
 Save mbox patches in a quilt\-ready folder
 .TP
 .BI \-P \ CHERRYPICK\fP,\fB \ \-\-cherry\-pick \ CHERRYPICK
-Cherry\-pick a subset of patches (e.g. "\-P 1\-2,4,6\-",
-"\-P _" to use just the msgid specified,
-or "\-P *globbing*" to match on commit subject)
+Cherry\-pick a subset of patches (e.g. "\-P 1\-2,4,6\-", "\-P _" to use just 
the msgid specified, or "\-P *globbing*" to match on commit subject)
 .TP
 .B \-g\fP,\fB  \-\-guess\-base
 Try to guess the base of the series (if not specified)
 .TP
 .B \-3\fP,\fB  \-\-prep\-3way
-Prepare for a 3\-way merge (tries to ensure that all
-index blobs exist by making a fake commit range)
+Prepare for a 3\-way merge (tries to ensure that all index blobs exist by 
making a fake commit range)
+.TP
+.B \-\-no\-cover
+Do not save the cover letter (on by default when using \-o \-)
 .UNINDENT
 .UNINDENT
 .sp
@@ -198,12 +194,10 @@
 Use a custom From field
 .TP
 .B \-n\fP,\fB  \-\-no\-submit
-Do not submit attestation, just save the message ready
-to send
+Do not submit attestation, just save the message ready to send
 .TP
 .BI \-o \ OUTPUT\fP,\fB \ \-\-output \ OUTPUT
-Save attestation message in this file if not
-submitting it
+Save attestation message in this file if not submitting it
 .UNINDENT
 .UNINDENT
 .sp
@@ -236,8 +230,7 @@
 Convert a pull request into an mbox full of patches
 .TP
 .BI \-o \ OUTMBOX\fP,\fB \ \-\-output\-mbox \ OUTMBOX
-Save exploded messages into this mailbox (default:
-msgid.mbx)
+Save exploded messages into this mailbox (default: msgid.mbx)
 .UNINDENT
 .UNINDENT
 .sp
@@ -323,6 +316,8 @@
 .B \-c\fP,\fB  \-\-color
 Force color output even when writing to file
 .UNINDENT
+.IP "System Message: WARNING/2 (b4.5.rst:, line 201)"
+Option list ends without a blank line; unexpected unindent.
 .INDENT 0.0
 .TP
 .B \-m AMBOX AMBOX, \-\-compare\-am\-mboxes AMBOX AMBOX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/b4-0.5.0+git20200526.ga926bac9e6c2/man/b4.5.rst 
new/b4-0.5.0+git20200528.g204416b80fbb/man/b4.5.rst
--- old/b4-0.5.0+git20200526.ga926bac9e6c2/man/b4.5.rst 2020-05-26 
14:40:29.000000000 +0200
+++ new/b4-0.5.0+git20200528.g204416b80fbb/man/b4.5.rst 2020-05-28 
18:12:16.000000000 +0200
@@ -53,17 +53,15 @@
 optional arguments:
   -h, --help            show this help message and exit
   -o OUTDIR, --outdir OUTDIR
-                        Output into this directory
+                        Output into this directory (or use - to output mailbox 
contents to stdout)
   -p USEPROJECT, --use-project USEPROJECT
-                        Use a specific project instead of guessing (linux-mm,
-                        linux-hardening, etc)
+                        Use a specific project instead of guessing (linux-mm, 
linux-hardening, etc)
   -c, --check-newer-revisions
                         Check if newer patch revisions exist
   -n WANTNAME, --mbox-name WANTNAME
                         Filename to name the mbox file
   -m LOCALMBOX, --use-local-mbox LOCALMBOX
-                        Instead of grabbing a thread from lore, process this
-                        mbox file
+                        Instead of grabbing a thread from lore, process this 
mbox file
   -C, --no-cache        Do not use local cache
 
 *Example*: b4 mbox [email protected]
@@ -79,17 +77,15 @@
 optional arguments:
   -h, --help            show this help message and exit
   -o OUTDIR, --outdir OUTDIR
-                        Output into this directory
+                        Output into this directory (or use - to output mailbox 
contents to stdout)
   -p USEPROJECT, --use-project USEPROJECT
-                        Use a specific project instead of guessing (linux-mm,
-                        linux-hardening, etc)
+                        Use a specific project instead of guessing (linux-mm, 
linux-hardening, etc)
   -c, --check-newer-revisions
                         Check if newer patch revisions exist
   -n WANTNAME, --mbox-name WANTNAME
                         Filename to name the mbox file
   -m LOCALMBOX, --use-local-mbox LOCALMBOX
-                        Instead of grabbing a thread from lore, process this
-                        mbox file
+                        Instead of grabbing a thread from lore, process this 
mbox file
   -C, --no-cache        Do not use local cache
   -v WANTVER, --use-version WANTVER
                         Get a specific version of the patch/series
@@ -103,14 +99,14 @@
   -l, --add-link        Add a lore.kernel.org/r/ link to every patch
   -Q, --quilt-ready     Save mbox patches in a quilt-ready folder
   -P CHERRYPICK, --cherry-pick CHERRYPICK
-                        Cherry-pick a subset of patches (e.g. "-P 1-2,4,6-",
-                        "-P _" to use just the msgid specified,
-                        or "-P \*globbing\*" to match on commit subject)
+                        Cherry-pick a subset of patches (e.g. "-P 1-2,4,6-", 
"-P _" to use just the msgid specified, or "-P \*globbing\*" to match on commit 
subject)
   -g, --guess-base
                         Try to guess the base of the series (if not specified)
   -3, --prep-3way
-                        Prepare for a 3-way merge (tries to ensure that all
-                        index blobs exist by making a fake commit range)
+                        Prepare for a 3-way merge (tries to ensure that all 
index blobs exist by making a fake commit range)
+  --no-cover
+                        Do not save the cover letter (on by default when using 
-o -)
+
 
 *Example*: b4 am [email protected]
 
@@ -126,11 +122,10 @@
   -h, --help            show this help message and exit
   -f SENDER, --from SENDER
                         Use a custom From field
-  -n, --no-submit       Do not submit attestation, just save the message ready
-                        to send
+  -n, --no-submit
+                        Do not submit attestation, just save the message ready 
to send
   -o OUTPUT, --output OUTPUT
-                        Save attestation message in this file if not
-                        submitting it
+                        Save attestation message in this file if not 
submitting it
 
 *Example*: b4 attest -n -o output/xxxx-attestation.patch output/\*.patch
 
@@ -151,8 +146,7 @@
   -c, --check           Check if pull request has already been applied
   -e, --explode         Convert a pull request into an mbox full of patches
   -o OUTMBOX, --output-mbox OUTMBOX
-                        Save exploded messages into this mailbox (default:
-                        msgid.mbx)
+                        Save exploded messages into this mailbox (default: 
msgid.mbx)
 
 *Example*: b4 pr 202003292120.2BDCB41@keescook
 
@@ -208,7 +202,7 @@
   -m AMBOX AMBOX, --compare-am-mboxes AMBOX AMBOX
                         Compare two mbx files prepared with "b4 am"
 
-*Example*: b4 diff
+*Example*: b4 diff [email protected]
 
 CONFIGURATION
 -------------


Reply via email to