├── .b4-config ├── .gitignore ├── .gitmodules ├── .keys ├── ed25519 │ └── t-8ch.de │ │ └── thomas │ │ └── 20221212 └── openpgp │ ├── chromium.org │ └── keescook │ │ └── default │ ├── linuxfoundation.org │ └── konstantin │ │ └── default │ ├── pbarker.dev │ └── paul │ │ └── default │ └── tessares.net │ └── matthieu.baerts │ └── default ├── .readthedocs.yaml ├── .vale.ini ├── CONTRIBUTING.rst ├── COPYING ├── MANIFEST.in ├── README.rst ├── b4.sh ├── docs ├── conf.py ├── config.rst ├── contributor │ ├── overview.rst │ ├── prep.rst │ ├── send.rst │ └── trailers.rst ├── index.rst ├── installing.rst ├── maintainer │ ├── am-shazam.rst │ ├── diff.rst │ ├── kr.rst │ ├── mbox.rst │ ├── overview.rst │ ├── pr.rst │ └── ty.rst └── requirements.txt ├── misc ├── default.conf ├── requirements-completion.in ├── retrieve_lore_thread.py ├── send-receive.py └── tc-generate.sh ├── plan.otl ├── pyproject.toml ├── requirements.in ├── requirements.txt └── src ├── b4 ├── __init__.py ├── command.py ├── diff.py ├── ez.py ├── kr.py ├── man │ ├── b4.1 │ └── b4.1.rst ├── mbox.py ├── pr.py ├── templates │ ├── shazam-merge-template.example │ ├── thanks-am-template.example │ └── thanks-pr-template.example └── ty.py └── tests ├── __init__.py ├── conftest.py ├── samples ├── gitdir.bundle ├── gpg-badsig.txt ├── gpg-good-invalid-notrust.txt ├── gpg-good-valid-notrust.txt ├── gpg-good-valid-trusted.txt ├── gpg-no-pubkey.txt ├── save-7bit-clean.txt ├── save-8bit-clean.txt ├── sevenbitify-1.verify ├── shazam-git1-just-series-defaults.verify ├── shazam-git1-just-series-merged.verify ├── shazam-git1-just-series.mbox ├── trailers-followup-bare-address-ref-defaults.txt ├── trailers-followup-bare-address.mbox ├── trailers-followup-custody-ref-ordered.txt ├── trailers-followup-custody-ref-unordered.txt ├── trailers-followup-custody-ref-with-ignored.txt ├── trailers-followup-custody.mbox ├── trailers-followup-name-parens-ref-defaults.txt ├── trailers-followup-name-parens.mbox ├── trailers-followup-non-git-patch-ref-defaults.txt ├── trailers-followup-non-git-patch-with-comments-ref-defaults.txt ├── trailers-followup-non-git-patch-with-comments.mbox ├── trailers-followup-non-git-patch.mbox ├── trailers-followup-nore-ref-defaults.txt ├── trailers-followup-nore.mbox ├── trailers-followup-partial-reroll-ref-defaults.txt ├── trailers-followup-partial-reroll.mbox ├── trailers-followup-single-ref-addlink.txt ├── trailers-followup-single-ref-addmsgid.txt ├── trailers-followup-single-ref-addmysob.txt ├── trailers-followup-single-ref-copyccs.txt ├── trailers-followup-single-ref-defaults.txt ├── trailers-followup-single-ref-noadd.txt ├── trailers-followup-single-ref-ordered.txt ├── trailers-followup-single-ref-sloppy.txt ├── trailers-followup-single.mbox ├── trailers-followup-stripped-lines-ref-defaults.txt ├── trailers-followup-stripped-lines.mbox ├── trailers-followup-with-cover-ref-addlink.txt ├── trailers-followup-with-cover-ref-defaults.txt ├── trailers-followup-with-cover.mbox ├── trailers-followup-with-diffstat-ref-defaults.txt ├── trailers-followup-with-diffstat.mbox ├── trailers-test-extinfo.txt ├── trailers-test-simple.txt ├── trailers-thread-with-cover-followup.mbox ├── trailers-thread-with-cover-followup.verify ├── trailers-thread-with-followups-and-tripledash.verify ├── trailers-thread-with-followups-no-match.verify ├── trailers-thread-with-followups.mbox ├── trailers-thread-with-followups.verify └── trailers-with-tripledash.bundle ├── test___init__.py ├── test_ez.py └── test_mbox.py /.b4-config: -------------------------------------------------------------------------------- 1 | [b4] 2 | midmask = https://lore.kernel.org/%s 3 | linkmask = https://patch.msgid.link/%s 4 | send-series-to = Kernel.org Tools 5 | send-series-cc = Konstantin Ryabitsev 6 | send-endpoint-web = https://lkml.kernel.org/_b4_submit 7 | send-prefixes = b4 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.pyc 3 | *.pyo 4 | *.json 5 | *.pdf 6 | test.log 7 | build/* 8 | dist/* 9 | MANIFEST 10 | .idea 11 | __pycache__ 12 | *.egg-info 13 | *.patch 14 | *.mbx 15 | *.maildir 16 | *.cover 17 | *.thanks 18 | .venv 19 | qodana.yaml 20 | *.ipynb 21 | pytest.log 22 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "patatt"] 2 | path = patatt 3 | url = https://git.kernel.org/pub/scm/utils/patatt/patatt.git 4 | -------------------------------------------------------------------------------- /.keys/ed25519/t-8ch.de/thomas/20221212: -------------------------------------------------------------------------------- 1 | KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= 2 | -------------------------------------------------------------------------------- /.keys/openpgp/pbarker.dev/paul/default: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | 3 | 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 56 | =907n 57 | -----END PGP PUBLIC KEY BLOCK----- 58 | -------------------------------------------------------------------------------- /.keys/openpgp/tessares.net/matthieu.baerts/default: -------------------------------------------------------------------------------- 1 | pub rsa4096 2015-08-31 [SC] 2 | E8CB85F76877057A6E27F77AF6B7824F4269A073 3 | uid Matthieu Baerts 4 | uid Matthieu Baerts 5 | sub rsa4096 2015-08-31 [E] 6 | 5B1A4BFBA06327FAC85B89272F9C14FD7EDF0E65 7 | sub ed25519 2021-08-26 [S] 8 | 1B86596F99E77A0D744A4E387C22F0C2F3470A97 9 | 10 | -----BEGIN PGP PUBLIC KEY BLOCK----- 11 | 12 | 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 123 | =CUrO 124 | -----END PGP PUBLIC KEY BLOCK----- 125 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # Read the Docs configuration file for Sphinx projects 2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 3 | 4 | # Required 5 | version: 2 6 | 7 | # Set the OS, Python version and other tools you might need 8 | build: 9 | os: ubuntu-22.04 10 | tools: 11 | python: "3.12" 12 | # You can also specify other tool versions: 13 | # nodejs: "20" 14 | # rust: "1.70" 15 | # golang: "1.20" 16 | 17 | # Build documentation in the "docs/" directory with Sphinx 18 | sphinx: 19 | configuration: docs/conf.py 20 | # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs 21 | # builder: "dirhtml" 22 | # Fail on all warnings to avoid broken references 23 | # fail_on_warning: true 24 | 25 | # Optionally build your docs in additional formats such as PDF and ePub 26 | # formats: 27 | # - pdf 28 | # - epub 29 | 30 | # Optional but recommended, declare the Python requirements required 31 | # to build your documentation 32 | # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html 33 | python: 34 | install: 35 | - requirements: docs/requirements.txt 36 | -------------------------------------------------------------------------------- /.vale.ini: -------------------------------------------------------------------------------- 1 | StylesPath = ~/.local/share/vale/styles 2 | MinAlertLevel = suggestion 3 | Packages = Google, proselint, Readability 4 | Vocab = git 5 | 6 | [*.rst] 7 | BasedOnStyles = Vale, Google, proselint, Readability 8 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | Submitting Patches to b4 2 | ======================== 3 | 4 | The current b4 source code can be found at:: 5 | 6 | git clone https://git.kernel.org/pub/scm/utils/b4/b4.git/ 7 | 8 | patches can be sent to:: 9 | 10 | tools@kernel.org 11 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include COPYING 2 | include src/b4/man/*.rst 3 | include src/b4/templates/* 4 | prune src/tests 5 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | B4 tools 2 | ======== 3 | This is a helper utility to work with patches made available via a 4 | public-inbox archive like lore.kernel.org. It is written to make it 5 | easier to participate in a patch-based workflows, like those used in 6 | the Linux kernel development. 7 | 8 | The name "b4" was chosen for ease of typing and because B-4 was the 9 | precursor to Lore and Data in the Star Trek universe. 10 | 11 | See https://b4.docs.kernel.org/ for online documentation. 12 | 13 | Installing 14 | ---------- 15 | To install the latest released version with pip:: 16 | 17 | python3 -m pip install b4 18 | 19 | Or to install the latest master (warning, maybe broken!):: 20 | 21 | python3 -m pip install git+https://git.kernel.org/pub/scm/utils/b4/b4.git@master 22 | 23 | Shell completion 24 | ---------------- 25 | b4 makes use of the python-shtab module to provide static shell completion 26 | files. Currently python-shtab supports bash, zsh and tcsh, where others may be 27 | added in the future. 28 | 29 | To install b4 with pip and shell completion use:: 30 | 31 | python3 -m pip install b4[completion] 32 | 33 | Shell completion is provided by the command ``b4 --print-completion 34 | {bash,zsh,tcsh}``. To enable shell completion run:: 35 | 36 | eval $(b4 --print-completion bash) 37 | 38 | To make it permanent on new shells, add that command to your ``$HOME/.bashrc`` 39 | or ``$HOME/.zshrc``. 40 | 41 | Upgrading 42 | --------- 43 | If you previously installed from pypi:: 44 | 45 | python3 -m pip install --upgrade b4 46 | 47 | Or to get the latest stuff from git:: 48 | 49 | python3 -m pip install --upgrade git+https://git.kernel.org/pub/scm/utils/b4/b4.git@master 50 | 51 | Running from the checkout dir 52 | ----------------------------- 53 | If you want to run from the checkout dir without installing the python 54 | package, you can use the included ``b4.sh`` wrapper. You can set it as 55 | an alias in your .bash_profile:: 56 | 57 | alias b4="$HOME/path/to/b4/b4.sh" 58 | 59 | Setting up a symlink should also be possible. Remember to run the 60 | following commands after the initial clone:: 61 | 62 | git submodule update --init 63 | python3 -m pip install -r requirements.txt 64 | 65 | Support 66 | ------- 67 | For support or with any other questions, please email tools@kernel.org, 68 | or browse the list archive at https://lore.kernel.org/tools. 69 | -------------------------------------------------------------------------------- /b4.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Run b4 from a git checkout. 4 | # 5 | 6 | REAL_SCRIPT=$(realpath -e ${BASH_SOURCE[0]}) 7 | SCRIPT_TOP="${SCRIPT_TOP:-$(dirname ${REAL_SCRIPT})}" 8 | 9 | PYTHONPATH="${SCRIPT_TOP}/src:${SCRIPT_TOP}/patatt${PYTHONPATH:+:$PYTHONPATH}" \ 10 | exec python3 "${SCRIPT_TOP}/src/b4/command.py" "${@}" 11 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | project = 'B4 end-user docs' 2 | copyright = '2019-2022, The Linux Foundation and contributors' 3 | author = 'Kernel.org' 4 | templates_path = ['_templates'] 5 | html_theme = 'sphinx_rtd_theme' 6 | # Don't highlight by default 7 | highlight_language = 'none' 8 | master_doc = 'index' 9 | -------------------------------------------------------------------------------- /docs/contributor/overview.rst: -------------------------------------------------------------------------------- 1 | Contributor overview 2 | ==================== 3 | .. note:: 4 | 5 | ``b4 prep``, ``b4 send`` and ``b4 trailers`` are available starting 6 | with version 0.10. 7 | 8 | Even though b4 started out as a tool to help maintainers, beginning with 9 | the version ``0.10`` there is also a set of features aimed at making it 10 | easier for contributors to submit patch series: 11 | 12 | * ``b4 prep`` allows to get your patch series ready for sending to the 13 | maintainer for review 14 | * ``b4 send`` simplifies the process of submitting your patches to the 15 | upstream maintainer even if you don't have access to a compliant SMTP 16 | server 17 | * ``b4 trailers`` simplifies the process of retrieving code-review 18 | trailers received on the distribution lists and applying them to your 19 | tree 20 | 21 | .. warning:: 22 | 23 | This is a fairly new set of features and can still be buggy or do 24 | something unexpected. While a lot of work has gone into making sure 25 | that your git tree isn't harmed in any way, it's best to have backups 26 | and to always review things with ``--dry-run`` when that option is 27 | available. 28 | 29 | If you come across a bug or unexpected behaviour, please report the 30 | problem to the Tools mailing list. 31 | 32 | Is it still required to be able to send email? 33 | ---------------------------------------------- 34 | While ``b4 send`` makes it possible to submit patches without having 35 | access to an SMTP server, you still need a reasonable mail server for 36 | participating in conversations and code review. 37 | 38 | The main benefit of ``b4 send`` is that you no longer have to really 39 | care if your mail server performs some kind of content mangling that 40 | causes patches to become corrupted, or if it doesn't provide a way to 41 | send mail via SMTP. 42 | 43 | What's the b4 contributor workflow? 44 | ----------------------------------- 45 | You can expect to be working with git commits, so you should be familiar 46 | with such git commands as ``git commit --amend`` and ``git rebase 47 | -i``. In general, the process goes like this: 48 | 49 | 1. Prepare your patch series by using ``b4 prep`` and queueing your 50 | commits. Use ``git rebase -i`` to arrange the commits in the right 51 | order and to write good commit messages. 52 | 53 | 2. Prepare your cover letter using ``b4 prep --edit-cover``. You should 54 | provide a good overview of what your series does and why you think it 55 | will improve the current code. 56 | 57 | 3. When you are almost ready to send, use ``b4 prep --auto-to-cc`` 58 | to collect the relevant addresses from your commits. If your project 59 | uses a ``MAINTAINERS`` file, this should also perform the required 60 | query to figure out whom to include on your patch series submission. 61 | 62 | 4. Review the list of addresses that b4 added to the cover letter and, 63 | if you know what you're doing, remove any that you think are 64 | unnecessary. 65 | 66 | 5. Run pre-flight checks on your series to improve your chances of 67 | getting positive reviews. 68 | 69 | 6. Send your series using ``b4 send``. This should automatically 70 | increment your series to the next version and add changelog entries 71 | to the cover letter. 72 | 73 | 7. Await code review and feedback from maintainers. 74 | 75 | 8. Apply any received code-review trailers using ``b4 trailers -u``. 76 | 77 | 9. Use ``git rebase -i`` to make any changes to the code based on the 78 | feedback you receive. Remember to record these changes in the cover 79 | letter's changelog. 80 | 81 | 10. Unless maintainers accept your series and merge them upstream, go 82 | back to #2 and continue until you succeed. 83 | 84 | 11. Clean up obsolete prep-managed branches using ``b4 prep --cleanup`` 85 | 86 | Please read the rest of these docs for details on the ``prep``, 87 | ``send``, and ``trailers`` commands. 88 | -------------------------------------------------------------------------------- /docs/contributor/trailers.rst: -------------------------------------------------------------------------------- 1 | trailers: retrieving code-review trailers 2 | ========================================= 3 | This commands allows you to easily retrieve code-review trailers sent in 4 | reply to your work and apply them to the matching commits. It should 5 | locate code-review trailers sent in response to any previously submitted 6 | versions of your series, as long as: 7 | 8 | * either the patch-id of the commit still matches what was sent, or 9 | * the title of the commit is exactly the same 10 | 11 | You can always edit the trailers after they are applied by using ``git 12 | rebase -i`` and choosing ``reword`` as rebase action. 13 | 14 | Most commonly, you just need to run:: 15 | 16 | b4 trailers -u 17 | 18 | Command flags 19 | ------------- 20 | ``-u, --update`` 21 | Update branch commits with latest received trailers. 22 | 23 | ``-S, --sloppy-trailers`` 24 | Accept trailers where the email address of the sender differs from the 25 | email address found in the trailer itself. 26 | 27 | ``-F MSGID, --trailers-from MSGID`` 28 | Look for trailer updates in an arbitrary tread found on the 29 | public-inbox server. Note, that this is generally only useful in the 30 | following two cases: 31 | 32 | * for branches not already managed by ``b4 prep`` 33 | * when a single larger series is broken up into multiple smaller 34 | series (or vice-versa) 35 | 36 | ``--since GITLOGDATE`` 37 | Only useful with ``-F``. By default, b4 will only look for your own 38 | commits as far as 1 month ago. With this flag, you can instruct it to 39 | look further back. 40 | 41 | ``--since-commit COMMITISH`` 42 | Looks at all commits that happened since the specified commit (or tag, 43 | or branch HEAD) where you are the committer, and then queries the 44 | public-inbox server for matching patch-ids. Pulls in any code-review 45 | trailers received for the matching patches. 46 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | B4 end-user documentation 2 | ========================= 3 | B4 is a tool created to make it easier for project developers and 4 | maintainers to use a distributed development workflow that relies on 5 | patches and distribution lists for code contributions and review. 6 | 7 | This documentation is split into two main areas -- one aimed at 8 | maintainers who primarily receive, review, and apply patches to their 9 | trees, and the other at developers who submit patches or patch series 10 | for maintainer review. 11 | 12 | Installation and configuration 13 | ------------------------------ 14 | .. toctree:: 15 | :maxdepth: 1 16 | 17 | installing 18 | config 19 | 20 | For maintainers 21 | --------------- 22 | .. toctree:: 23 | :maxdepth: 1 24 | 25 | maintainer/overview 26 | maintainer/mbox 27 | maintainer/am-shazam 28 | maintainer/diff 29 | maintainer/pr 30 | maintainer/ty 31 | maintainer/kr 32 | 33 | For developers 34 | -------------- 35 | .. toctree:: 36 | :maxdepth: 1 37 | 38 | contributor/overview 39 | contributor/prep 40 | contributor/send 41 | contributor/trailers 42 | 43 | Getting help 44 | ------------ 45 | To report a problem or suggest a feature, please send plaintext email to 46 | tools@kernel.org. 47 | -------------------------------------------------------------------------------- /docs/installing.rst: -------------------------------------------------------------------------------- 1 | Installing b4 2 | ============= 3 | B4 is packaged for many distributions, so chances are that you will be 4 | able to install it using your regular package installation commands, 5 | e.g.:: 6 | 7 | # dnf install b4 8 | 9 | or:: 10 | 11 | # apt install b4 12 | 13 | Note, that b4 is under heavy development, so it is possible that the 14 | version packaged for your distribution is not as recent as you'd like. 15 | If that is the case, you can install it from other sources. 16 | 17 | Installing with pip 18 | ------------------- 19 | To install from PyPi:: 20 | 21 | python3 -m pip install --user b4 22 | 23 | This will install b4 locally and pull in any required dependencies. If 24 | you are not able to execute ``b4 --version`` after pip completes, check 25 | that your ``~/.local/bin/`` is in your ``$PATH``. 26 | 27 | Upgrading 28 | ~~~~~~~~~ 29 | If you have previously installed from PyPi, you can upgrade using pip as 30 | well:: 31 | 32 | python3 -m pip install --user --upgrade b4 33 | 34 | Running from the checkout dir 35 | ----------------------------- 36 | If you want to run the latest development version of b4, you can run it 37 | directly from the git repository:: 38 | 39 | git clone https://git.kernel.org/pub/scm/utils/b4/b4.git 40 | cd b4 41 | git submodule update --init 42 | pip install --user -r requirements.txt 43 | 44 | You can then either symlink the ``b4.sh`` script to your user-bin 45 | directory:: 46 | 47 | ln -sf $HOME/path/to/b4.sh ~/bin/b4 48 | 49 | or you can add an alias to your shell's RC file:: 50 | 51 | alias b4="$HOME/path/to/b4/b4.sh" 52 | 53 | Using a stable branch 54 | ~~~~~~~~~~~~~~~~~~~~~ 55 | If you don't want to use the master branch (which may not be stable), 56 | you can switch to a stable branch instead, e.g.:: 57 | 58 | git switch stable-0.9.y 59 | 60 | Updating the git checkout 61 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 62 | It should be sufficient to just turn ``git pull``:: 63 | 64 | git pull origin master 65 | git submodule update 66 | 67 | If you notice that ``requirements.txt`` has been updated, you may wish 68 | to run the pip command again:: 69 | 70 | pip install --user -r requirements.txt 71 | -------------------------------------------------------------------------------- /docs/maintainer/am-shazam.rst: -------------------------------------------------------------------------------- 1 | am,shazam: retrieving and applying patches 2 | ========================================== 3 | The most common use of b4 is to retrieve, prepare, and apply patches 4 | sent via distribution lists. For example, you can use it to retrieve a 5 | set of patches using the ``Message-ID``:: 6 | 7 | b4 am 20200313231252.64999-1-keescook@chromium.org 8 | 9 | This does the following: 10 | 11 | 1. Looks up that Message-ID on the specified public-inbox server, using 12 | lore.kernel.org by default. 13 | 2. Retrieves the full thread containing that message-id. 14 | 3. Processes all replies to collect code review trailers and apply them 15 | to the corresponding commit messages. 16 | 4. Performs attestation checks on patches and follow-ups containing 17 | code-review trailers. 18 | 5. Puts all patches in the correct order and prepares them for "git am" 19 | 6. Writes out the resulting mailbox so it is ready to be applied to a 20 | git tree. 21 | 22 | For example:: 23 | 24 | $ b4 am 20200313231252.64999-1-keescook@chromium.org 25 | Analyzing 5 messages in the thread 26 | Checking attestation on all messages, may take a moment... 27 | --- 28 | ✓ [PATCH v2 1/2] selftests/harness: Move test child waiting logic 29 | ✓ [PATCH v2 2/2] selftests/harness: Handle timeouts cleanly 30 | --- 31 | ✓ Signed: DKIM/chromium.org 32 | --- 33 | Total patches: 2 34 | --- 35 | Cover: ./v2_20200313_keescook_selftests_harness_handle_timeouts_cleanly.cover 36 | Link: https://lore.kernel.org/r/20200313231252.64999-1-keescook@chromium.org 37 | Base: not specified 38 | git am ./v2_20200313_keescook_selftests_harness_handle_timeouts_cleanly.mbx 39 | 40 | b4 am vs. b4 shazam 41 | ------------------- 42 | The two commands are similar -- the main distinction is that ``b4 am`` 43 | prepares the patch series so you can ``git am`` the resulting mbox file, 44 | but it doesn't make any actual modifications to your current branch. 45 | 46 | The ``b4 shazam`` command dos the same as ``b4 am`` *and* actually 47 | applies the patch series to the current branch (if it's possible to do 48 | so cleanly). 49 | 50 | Common flags 51 | ------------ 52 | The following flags are common to both commands: 53 | 54 | ``-m LOCALMBOX, --use-local-mbox LOCALMBOX`` 55 | By default, b4 retrieves threads from remote public-inbox servers, but 56 | it can also use a local mailbox/maildir. This is useful if you have a 57 | tool like ``mbsync`` or ``lei`` copying remote messages locally and 58 | you need to do some work while offline. You can pass ``-`` to read 59 | messages from stdin. 60 | 61 | ``--stdin-pipe-sep STDIN_PIPE_SEP`` 62 | When reading input from stdin, split messages using the string passed 63 | as parameter. Otherwise, b4 expects stdin to be a single message or a 64 | valid mbox. 65 | 66 | This is most useful when piping threads directly from mutt. In your 67 | ``.muttrc`` add the following configuration parameter:: 68 | 69 | set pipe_sep = "\n---randomstr---\n" 70 | 71 | Then invoke b4 with ``-m - --stdin-pipe-sep='\n---randomstr---\n'`` 72 | 73 | ``-C, --no-cache`` 74 | By default, b4 caches the retrieved threads for about 10 minutes. 75 | This lets you force b4 to ignore cache and retrieve the latest 76 | results. 77 | 78 | ``--single-message`` **(0.13+)** 79 | By default, b4 retrieves the entire thread, but sometimes you really 80 | just want a single message. This helps when someone posts a patch in 81 | the middle of a long thread and you just want that patch and ignore 82 | the rest of the messages. 83 | 84 | ``-v WANTVER, --use-version WANTVER`` 85 | If a thread (or threads, when used with ``-c``) contains multiple 86 | patch series revisions, b4 automatically picks the highest numbered 87 | version. This switch lets you pick a different revision. 88 | 89 | ``-S, --sloppy-trailers`` 90 | B4 tries to be careful when collecting code review trailers and 91 | refuses to consider the trailers where the email address in the 92 | ``From:`` header doesn't match the address in the trailer itself. 93 | 94 | For example, this follow-up trailer doesn't match and b4 ignores it by 95 | default:: 96 | 97 | From: Alice Maintainer 98 | Subject: Re: [PATCH v3 3/3] Some patch title 99 | 100 | > [...] 101 | Reviewed-by: Alice Maintainer 102 | 103 | When b4 encounters such situations, it prints a warning and refuses to 104 | apply the trailer due to the email address mismatch. You can override 105 | this behavior by passing the ``-S`` flag. 106 | 107 | ``-T, --no-add-trailers`` 108 | This tells b4 to ignore any follow-up trailers and just save the 109 | patches as sent by the contributor. 110 | 111 | ``-s, --add-my-sob`` 112 | Applies your own ``Signed-off-by:`` trailer to every commit. 113 | 114 | ``-l, --add-link`` 115 | Adds a ``Link:`` trailer with the URL of the retrieved message using 116 | the ``linkmask`` template. 117 | 118 | ``-i, --add-message-id`` 119 | Adds a ``Message-ID:`` trailer with the Message-ID of the retrieved 120 | message. Cannot be used together with the ``-l`` switch. 121 | 122 | ``-P CHERRYPICK, --cherry-pick CHERRYPICK`` 123 | This allows you to select a subset of patches from a larger series. 124 | Here are a few examples. 125 | 126 | This picks patches 1, 3, 5, 6, 7, 9, and any others that follow:: 127 | 128 | b4 am -P 1,3,5-7,9- 129 | 130 | This picks just the patch that matches the exact message-id 131 | provided:: 132 | 133 | b4 am -P _ 134 | 135 | This picks just the last patch from a series:: 136 | 137 | b4 am -P -1 138 | 139 | This picks all patches where the subject matches "iscsi":: 140 | 141 | b4 am -P *iscsi* 142 | 143 | ``--cc-trailers`` 144 | Copies all addresses found in the message ``Cc`` headers into ``Cc:`` 145 | commit trailers. 146 | 147 | ``--no-parent`` 148 | Break thread at the message-id specified and ignore any parent 149 | messages. This is handy with long convoluted threads, for example when 150 | someone replies with a different patch series in the middle of a 151 | larger conversation and b4 gets confused about which patch series you 152 | are requesting. 153 | 154 | ``--allow-unicode-control-chars`` 155 | There are malicious tricks that someone can do with unicode control 156 | chars that make the code as printed on the screen and reviewed by a 157 | human do something totally different when processed by a compiler. 158 | Such unicode control chars are almost never legitimately useful in the 159 | code, so b4 prints a warning and bails out when it finds them. 160 | However, just in case there are legitimate reasons for these 161 | characters to be in the code, for example, as part of documentation 162 | translated into left-to-right languages), you can override the default 163 | behavior with this switch. 164 | 165 | ``--check`` **(0.14+)** 166 | Tells b4 to run a series of local checks on each patch of the series 167 | and display any problems. When b4 finds a valid patchwork project 168 | definition in the configuration settings, it also looks up the CI 169 | status of each patch. 170 | 171 | For the Linux kernel tree, b4 runs the following checkpatch command:: 172 | 173 | ./scripts/checkpatch.pl -q --terse --no-summary --mailback 174 | 175 | You can specify a different command to run by setting the 176 | ``b4.am-perpatch-check-cmd`` configuration setting, e.g.:: 177 | 178 | [b4] 179 | am-perpatch-check-cmd = ./scripts/checkpatch.pl -q --terse --no-summary --mailback --strict 180 | 181 | Flags only valid for ``b4 am`` 182 | ------------------------------ 183 | The following flags only make sense for ``b4 am``: 184 | 185 | ``-o OUTDIR, --outdir OUTDIR`` 186 | Instead of writing the .mbox file to the current directory, write it 187 | to this location instead. You can also pass a path to an existing 188 | mbox or maildir location to have the results appended to that mailbox 189 | instead (see also the ``-f`` flag below). 190 | 191 | When ``-`` is specified, the output goes to stdout. 192 | 193 | ``-c, --check-newer-revisions`` 194 | When retrieving a patch series, perform a lookup to see if a newer 195 | revision is available. For example, if you are trying to retrieve a 196 | series titled ``[PATCH v2 0/3]``, b4 tries a number of mechanisms to 197 | look up if a ``v3`` or later revision exists and adds these results to 198 | the retrieved thread. 199 | 200 | ``-n WANTNAME, --mbox-name WANTNAME`` 201 | By default, the resulting mailbox file uses the message-id as the 202 | basis for its filename. This option lets you override this behaviour. 203 | 204 | ``-M, --save-as-maildir`` 205 | By default, b4 saves the retrieved thread as an mbox file. However, 206 | due to subtle incompatibilities between various mbox formats ("mboxo" 207 | vs "mboxrd", etc), you may instead want to save the results as a 208 | Maildir directory. 209 | 210 | ``-Q, --quilt-ready`` 211 | Saves the patches as a folder that you can pass directly to quilt. If 212 | you don't know what quilt is, you don't really need to worry about 213 | this option. 214 | 215 | ``-b GUESSBRANCH [...], --guess-branch GUESSBRANCH [...]`` 216 | When using ``--guess-base``, you can restrict which branch(es) b4 uses 217 | to find the match. If not specified, b4 uses the entire tree history. 218 | 219 | ``--guess-lookback GUESSDAYS`` 220 | When using ``--guess-base``, you can specify how far back b4 should 221 | look *from the date of the patch* to find the base commit. By default, 222 | b4 only considers the last 14 days prior to the date of the patch, 223 | but you can expand or shrink this range as necessary. 224 | 225 | ``-3, --prep-3way`` 226 | This tries to prepare your tree for a 3-way merge by doing some 227 | behind-the-scenes git magic and preparing some fake loose commits. 228 | 229 | ``--no-cover`` 230 | By default, b4 saves the cover letter as a separate file in the output 231 | directory specified. This flag turns it off. This is also the default 232 | when used with ``-o -``. 233 | 234 | ``--no-partial-reroll`` 235 | For minor changes, it's common practice for contributors to send 236 | follow-ups to just the patches they have modified. For example:: 237 | 238 | [PATCH v1 1/3] foo: add foo to bar 239 | [PATCH v1 2/3] bar: add bar to baz 240 | \- [PATCH v2 2/3] bar: add bar to baz 241 | [PATCH v1 3/3] baz: add baz to quux 242 | 243 | When b4 encounters this situation, it properly creates a v2 of the 244 | entire series by reusing ``[PATCH v1 1/3]`` and ``[PATCH v1 3/3]``. 245 | However, sometimes that isn't the right thing to do, so you can turn 246 | off this feature using ``--no-partial-reroll``. 247 | 248 | 249 | Flags only valid for ``b4 shazam`` 250 | ---------------------------------- 251 | By default, ``b4 shazam`` applies the patch series directly to the 252 | current git tree and the current branch in the directory where you run 253 | it. However, instead of just running ``git am`` and applying the patches 254 | directly, it can also treat the series as if it were a git pull request 255 | and either prepare a ``FETCH_HEAD`` that you can merge manually, or even 256 | automatically merge the series using the cover letter as the basis for 257 | the merge commit. 258 | 259 | ``-H, --make-fetch-head`` 260 | This prepares the series and places it into the ``FETCH_HEAD`` that 261 | you can merge just as if it were a pull request: 262 | 263 | 1. b4 prepares a temporary sparse worktree 264 | 2. b4 applies the series to that worktree 265 | 3. if ``git am`` completes successfully, b4 fetches that tree into 266 | your current tree's ``FETCH_HEAD``, and then gets rid of the 267 | temporary tree 268 | 4. b4 places the cover letter into ``.git/b4-cover`` 269 | 5. b4 suggests the command you can run to merge the change into your 270 | current branch, e.g.:: 271 | 272 | git merge --no-ff -F .git/b4-cover --edit FETCH_HEAD --signoff 273 | 274 | Generally, this command is also a good test to see if a patch series 275 | is going to apply cleanly to a tree. You can perform any actions with 276 | the ``FETCH_HEAD`` as you normally would, such as run ``git diff``, 277 | make a new branch out of it using ``git checkout``, etc. 278 | 279 | ``-M, --merge`` 280 | Exactly the same as ``--make-fetch-head``, but will actually execute 281 | the suggested ``git merge`` command. 282 | 283 | Please also see the :ref:`shazam_settings` section for some 284 | configuration file options that affect some of ``b4 shazam`` behaviour. 285 | -------------------------------------------------------------------------------- /docs/maintainer/diff.rst: -------------------------------------------------------------------------------- 1 | diff: comparing patch series 2 | ============================ 3 | The ``diff`` subcommand allows comparing two different revisions of the 4 | same patch series using ``git range-diff``. Note, that in order to 5 | perform the ``range-diff`` comparison, both revisions need to cleanly 6 | apply to the current tree, which may not always be easy to achieve. 7 | 8 | The easiest way to use it is to prepare two mbox files of the series you 9 | would like to compare first:: 10 | 11 | $ b4 am --no-cover -n ver1 msgid-of-ver-1 12 | $ b4 am --no-cover -n ver2 msgid-of-ver-2 13 | $ b4 diff -m ver1.mbx ver2.mbx 14 | 15 | Optional flags 16 | -------------- 17 | ``-g GITDIR, --gitdir GITDIR`` 18 | Specify a path to the git tree to use, if not running the command 19 | inside a git tree. 20 | 21 | ``-C, --no-cache`` 22 | By default, b4 will cache the retrieved threads for about 10 minutes. 23 | This lets you force b4 to ignore cache and retrieve the latest 24 | results. 25 | 26 | ``-v WANTVERS [WANTVERS ...], --compare-versions WANTVERS [WANTVERS ...]`` 27 | To properly work, this requires that both versions being compared are 28 | part of the same thread, which is rarely the case. In the future, this 29 | may work better as more series use the ``change-id`` trailer to keep 30 | track of revisions across discussion threads. 31 | 32 | Example: ``b4 diff -v 2 3`` 33 | 34 | ``-n, --no-diff`` 35 | By default, ``b4 diff`` will output the results of the range-diff 36 | command. However, this can be a wall of text, so instead you may want 37 | to just view the command that you can run yourself with the ranges 38 | prepared by b4. This additionally allows you to tweak the 39 | ``git-range`` flags to use. 40 | 41 | ``-m AMBOX AMBOX, --compare-am-mboxes AMBOX AMBOX`` 42 | Compares two mbox files prepared by ``b4 am`` instead of querying 43 | the public-inbox server directly. 44 | 45 | ``--range-diff-opts RANGE_DIFF_OPTS`` 46 | Additional arguments passed to ``git range-diff``. For example:: 47 | 48 | b4 diff --range-diff-opts "--creation-factor=80 --no-dual-color" 49 | 50 | ``-o OUTDIFF, --output-diff OUTDIFF`` 51 | **(DEPRECATED)** Sends ``range-diff`` output into a file. You should use 52 | ``-n`` instead and redirect output from the actual ``git range-diff`` 53 | command. 54 | 55 | ``-c, --color`` 56 | **(DEPRECATED)** Show colour output even when outputting into a file. 57 | You should use ``-n`` instead and modify flags to ``range-diff``. 58 | -------------------------------------------------------------------------------- /docs/maintainer/kr.rst: -------------------------------------------------------------------------------- 1 | kr: working with contributor keys 2 | ================================= 3 | This subcommand allows maintaining a local keyring of contributor keys. 4 | 5 | .. note:: 6 | 7 | This functionality is under active development and the set of 8 | available features will be expanded in the near future. 9 | 10 | Patatt keyrings 11 | --------------- 12 | B4 uses the patatt patch attestation library for its purposes, and it 13 | uses patatt-style keyrings. You can read more information about managing 14 | patatt keyrings at the following page: 15 | 16 | * https://pypi.org/project/patatt/#getting-started-as-a-project-maintainer 17 | 18 | b4 kr --show-keys 19 | ----------------- 20 | At this stage, b4 has limited support for keyring management, but there 21 | are plans to expand this functionality in one of the future versions. At 22 | most, you can view what keys were used to sign a set of patches in a 23 | thread, e.g.:: 24 | 25 | $ b4 kr --show-keys 26 | Grabbing thread from lore.kernel.org/all//t.mbox.gz 27 | --- 28 | alice.developer@example.org: (unknown) 29 | keytype: ed25519 30 | pubkey: AbCdzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= 31 | krpath: ed25519/example.org/alice.developer/20211009 32 | fullpath: /home/user/.local/share/b4/keyring/ed25519/example.org/alice.developer/20211009 33 | --- 34 | For ed25519 keys: 35 | echo [pubkey] > [fullpath] 36 | 37 | At this time, if you want to store this public key in your local 38 | keyring, you can run the command suggested above:: 39 | 40 | echo AbCdzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= > \ 41 | /home/user/.local/share/b4/keyring/ed25519/example.org/alice.developer/20211009 42 | 43 | Now if you come across a signed set of patches from alice.developer, you 44 | should be able to view the attestation status in the ``b4 am`` output. 45 | 46 | -------------------------------------------------------------------------------- /docs/maintainer/mbox.rst: -------------------------------------------------------------------------------- 1 | mbox: retrieving threads 2 | ======================== 3 | .. note:: 4 | 5 | If you are looking for a way to continuously retrieve full threads 6 | (or even full search results) from a public-inbox server, the ``lei`` 7 | tool provides a much more robust way of doing that. 8 | 9 | Retrieving full discussion threads is the most basic use of b4. All you 10 | need to know is the message-id of any message in the thread:: 11 | 12 | b4 mbox 20200313231252.64999-1-keescook@chromium.org 13 | 14 | Alternatively, if you have found a thread on lore.kernel.org and you 15 | want to retrieve it in full, you can just use the full URL:: 16 | 17 | b4 mbox https://lore.kernel.org/lkml/20200313231252.64999-1-keescook@chromium.org/#t 18 | 19 | By default, b4 will save the thread in a mailbox format using the 20 | message-id of the message as the filename base:: 21 | 22 | $ b4 mbox 20200313231252.64999-1-keescook@chromium.org 23 | Grabbing thread from lore.kernel.org/all/20200313231252.64999-1-keescook%40chromium.org/t.mbox.gz 24 | 5 messages in the thread 25 | Saved ./20200313231252.64999-1-keescook@chromium.org.mbx 26 | 27 | Option flags 28 | ------------ 29 | ``-m LOCALMBOX, --use-local-mbox LOCALMBOX`` 30 | By default, b4 will retrieve threads from remote public-inbox servers, 31 | but it can also use a local mailbox/maildir. This is useful if you 32 | have a tool like ``mbsync`` or ``lei`` copying remote messages locally 33 | and you need to do some work while offline. You can pass ``-`` to read 34 | messages from stdin. 35 | 36 | ``--stdin-pipe-sep STDIN_PIPE_SEP`` **(0.11+)** 37 | When reading input from stdin, split messages using the string passed 38 | as parameter. Otherwise, b4 expects stdin to be a single message or a 39 | valid mbox. 40 | 41 | This is most useful when piping threads directly from mutt. In your 42 | ``.muttrc`` add the following configuration parameter:: 43 | 44 | set pipe_sep = "\n---randomstr---\n" 45 | 46 | Then invoke b4 with ``-m - --stdin-pipe-sep='\n---randomstr---\n'`` 47 | 48 | ``-C, --no-cache`` 49 | By default, b4 will cache the retrieved threads for about 10 minutes. 50 | This lets you force b4 to ignore cache and retrieve the latest 51 | results. 52 | 53 | ``--single-message`` **(0.13+)** 54 | By default, b4 will retrieve the entire thread, but sometimes you 55 | really just want a single message. This helps when someone posts a 56 | patch in the middle of a long thread and you just want that patch and 57 | ignore the rest of what is going on. 58 | 59 | ``-o OUTDIR, --outdir OUTDIR`` 60 | Instead of writing the .mbox file to the current directory, write it 61 | to this location instead. You can also pass a path to an existing 62 | mbox or maildir location to have the results appended to that mailbox 63 | instead (see also the ``-f`` flag below). 64 | 65 | ``-c, --check-newer-revisions`` 66 | When retrieving patch series, check if a newer revision is available. 67 | For example, if you are trying to retrieve a series titled ``[PATCH v2 68 | 0/3]``, b4 will use a number of mechanisms to check if a ``v3`` or 69 | later revision is also available and will add these results to the 70 | retrieved thread. 71 | 72 | ``-n WANTNAME, --mbox-name WANTNAME`` 73 | By default, the resulting mailbox file will use the message-id as the 74 | basis for its filename. This option lets you override this behaviour. 75 | 76 | ``-M, --save-as-maildir`` 77 | By default, the retrieved thread will be saved as an mbox file. 78 | However, due to subtle incompatibilities between various mbox formats 79 | ("mboxo" vs "mboxrd", etc), you may want to instead save the results 80 | as a Maildir directory. 81 | 82 | ``-f, --filter-dupes`` 83 | When adding messages to existing mailbox or maildir (with ``-o``), 84 | this will check all existing messages and will only add those messages 85 | that aren't already present. Note, that this uses simple message-id 86 | matching and no other checks for correctness are performed. 87 | 88 | ``-r MBOX, --refetch MBOX`` **(v0.12+)** 89 | This allows you to refetch all messages in the provided mailbox from 90 | the upstream public-inbox server. For example, this is useful when you 91 | have a .mbx file prepared by ``b4 am`` and you want to send a 92 | response to one of the patches. Performing a refetch will restore the 93 | original message headers that may have been dropped or modified by 94 | ``b4 am``. 95 | 96 | Using with mutt 97 | --------------- 98 | If you are a mutt or neomutt user and your mail is stored locally, you 99 | can define a quick macro that would let you quickly retrieve full 100 | threads and add them to your inbox. This is handy if you are cc'd in the 101 | middle of a conversation and you want to retrieve the rest of the thread 102 | for context. 103 | 104 | Add something like the following to your ``~/.muttrc``:: 105 | 106 | macro index 4 "b4 mbox -fo ~/Mail" 107 | 108 | Now selecting a message in the message index and pressing "4" will 109 | retrieve the rest of the thread from the public-inbox server and add 110 | them to the local maildir (``~/Mail`` in the example above). 111 | -------------------------------------------------------------------------------- /docs/maintainer/overview.rst: -------------------------------------------------------------------------------- 1 | Maintainer overview 2 | =================== 3 | The primary goal of b4 is to make it easier for maintainers to retrieve 4 | patch series, verify their authenticity, apply any follow-up code review 5 | trailers, and apply the patches to their maintained git trees. 6 | 7 | This functionality works best when coupled with a `public-inbox`_ 8 | aggregator service, such as the one running on lore.kernel.org, but can 9 | be used with local mailboxes and maildirs, thus providing fully 10 | decentralized, experience with robust end-to-end attestation. 11 | 12 | .. _`public-inbox`: https://public-inbox.org/README.html 13 | 14 | Working with patches sent to distribution lists 15 | ----------------------------------------------- 16 | Patches sent to distribution lists remains the only widely used 17 | decentralized code review framework. RFC2822-conformant ("email") 18 | messages adhere to an established standard that ensures high level of 19 | interoperability between systems, and it remains one of the remaining 20 | few truly decentralized communication platforms. 21 | 22 | Note, that "distribution lists" may not necessarily mean "patches sent 23 | via email". In addition to SMTP, RFC2822 messages can be also delivered 24 | via any number of push and pull mechanisms, such as NNTP, web archives, 25 | public-inbox repositories, etc. In the case of lore.kernel.org, the 26 | messages are collated from a large number of sources then replicated 27 | across multiple frontends. 28 | -------------------------------------------------------------------------------- /docs/maintainer/pr.rst: -------------------------------------------------------------------------------- 1 | pr: working with pull requests 2 | ============================== 3 | In addition to working with patches and patch series, b4 is also able to 4 | work with pull requests. It provides the following benefits as opposed 5 | to using git directly: 6 | 7 | * it can check if the pull request has already been applied before 8 | performing a git fetch 9 | * it will check the signature on the tag (or tip commit) 10 | * it can track applied pull requests and send replies to submitters 11 | (using ``b4 ty``) 12 | * it can explode a pull request into a series of patches for code review 13 | purposes 14 | 15 | Basic usage is very similar to ``b4 am``:: 16 | 17 | b4 pr 18 | 19 | By default, this will fetch the pull request into ``FETCH_HEAD``. 20 | 21 | Optional flags 22 | -------------- 23 | 24 | ``-g GITDIR, --gitdir GITDIR`` 25 | This specifies (or overrides) the git directory where the pull request 26 | should be applied. 27 | 28 | ``-b BRANCH, --branch BRANCH`` 29 | After fetching the pull request into ``FETCH_HEAD``, check it out as a 30 | new branch with the name specified. 31 | 32 | ``-c, --check`` 33 | Check if the specified pull request has already been applied. 34 | 35 | Exploding pull requests 36 | ----------------------- 37 | Pull requests are useful, but if the maintainer needs to do more than 38 | just accept or reject it, providing code review commentary on a PR can 39 | be difficult. For this reason, b4 can convert a pull request into a 40 | mailbox full of patches, as if the pull request was sent as a patch 41 | series. The exploded pull request will retain the correct author and 42 | To/Cc headers. 43 | 44 | ``-e, --explode`` 45 | Instructs b4 to convert a pull request to a series of patches and save 46 | them as a mailbox file. 47 | 48 | ``-o OUTMBOX, --output-mbox OUTMBOX`` 49 | If ``-o`` is not provided, the mailbox name will be based on the 50 | message-id of the pull request and saved in the local directory. This 51 | allows overriding that with a different path and name. 52 | 53 | Explode archival features 54 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | .. note:: 56 | 57 | These are experimental features that were developed for internal 58 | kernel.org use. 59 | 60 | The following flags are mostly useful when b4 is used 61 | for archival purposes. One of the goals of this feature was to make it 62 | possible to save pull requests, which are transient by nature, into an 63 | archival public-inbox so they can be analyzed by archivists at a later 64 | date if necessary. 65 | 66 | ``-f MAILFROM, --from-addr MAILFROM`` 67 | **(DEPRECATED)** When exploding pull requests, use this email address 68 | in the From header, instead of reusing the same From as in the pull 69 | request. 70 | 71 | ``-s SENDIDENTITY, --send-as-identity SENDIDENTITY`` 72 | **(DEPRECATED)** When resending pull requests as patch series, use 73 | this sendemail identity. 74 | 75 | ``--dry-run`` 76 | **(DEPRECATED)** Force a --dry-run on ``git-send-email`` invocation. 77 | 78 | -------------------------------------------------------------------------------- /docs/maintainer/ty.rst: -------------------------------------------------------------------------------- 1 | ty: sending automated contributor feedback 2 | ========================================== 3 | B4 makes it easier to send automated developer feedback when you apply 4 | patches or pull requests to your git tree. 5 | 6 | Tracking retrieved patches and PRs 7 | ---------------------------------- 8 | Any patches or pull requests you retrieve with ``b4 am,shazam,pr`` will 9 | be automatically tracked by b4 in your homedir (usually, in 10 | ``$HOME/.local/share/b4``, but may vary if your ``$XDG_DATA_HOME`` is 11 | set to a different value). There are four kinds of files in that 12 | directory: 13 | 14 | * .am: contain information about patches retrieved with ``b4 am`` or 15 | ``b4 shazam`` 16 | * .pr: contain information about pull requests retrieved with ``b4 pr`` 17 | * .sent: either .am or .pr tracked files that were successfully sent 18 | using ``b4 ty`` 19 | * .discarded: either .am or .pr tracked files that were deleted using 20 | ``b4 ty`` 21 | 22 | All of these files contain JSON data about the series or pull requests 23 | being tracked. 24 | 25 | Using the Auto-Thankanator 26 | -------------------------- 27 | If you've retrieved and applied some patches to your tree, you should be 28 | able to fire up the "auto-thankanator", which uses patch-id and commit 29 | subject tracking to figure out which series from those you have 30 | retrieved were applied to your tree. The process is usually pretty 31 | fast and fairly accurate. 32 | 33 | Manually listing and thanking 34 | ----------------------------- 35 | If you don't want to use the auto-thankanator, or if it's not finding a 36 | patch series (e.g. because you've made changes to a commit before 37 | applying it to your tree), you can use a more manual process. First, 38 | list all tracked series:: 39 | 40 | $ b4 ty -l 41 | 42 | Identify the series that you're sure got applied, then generate the 43 | thank-you message:: 44 | 45 | $ b4 ty -t 1 46 | 47 | This will write out a .thanks file in the current directory, which you 48 | can then modify and send out. 49 | 50 | Sending out mail vs. writing .thanks files 51 | ------------------------------------------ 52 | By default, ``b4 ty`` will write out .thanks files in the current 53 | directory, which allows you to edit the body of the message before 54 | sending it out, e.g. using ``mutt``:: 55 | 56 | $ mutt -f foo.thanks 57 | 58 | However, if you have a configured ``sendemail`` section, you can also 59 | tell b4 to send out the thanks message directly:: 60 | 61 | $ b4 ty -aS --dry-run 62 | 63 | The above command will locate all tracked series that got applied to 64 | your tree and show the messages that are going to be sent out. If you're 65 | happy with the results, you can omit the ``--dry-run`` switch to 66 | actually send the mail. 67 | 68 | If you want ``b4 ty`` to always send mail, you can make the ``-S`` 69 | switch permanent by setting the ``b4.ty-send-email`` config variable to 70 | ``yes``. 71 | 72 | Editing the templates 73 | --------------------- 74 | You can edit the default templates that are provided with b4 to 75 | customize the thank-you message. Once you have your own versions, you 76 | can specify the path to the template to use via the 77 | ``b4.thanks_am_template`` and ``b4.thanks_pr_template`` configuration 78 | parameters. See :ref:`ty_settings` for details. 79 | 80 | Optional flags 81 | -------------- 82 | ``-g GITDIR, --gitdir GITDIR`` 83 | The git tree to use instead of the current working directory. 84 | 85 | ``-o OUTDIR, --outdir OUTDIR`` 86 | Where to write the .thanks files if not into the current directory. 87 | Has no effect when ``-S`` is used. 88 | 89 | ``-l, --list`` 90 | Lists all tracked patch series and pull requests. 91 | 92 | ``-t THANKFOR, --thank-for THANKFOR`` 93 | From the listing generated by ``--list``, specify which thank-you 94 | notes should be sent. This command accepts comma-separated values and 95 | ranges, including open-ended ranges, e.g.: ``-t 1,3,5-7,9-``. When using 96 | a single number, it's possible to use negative values to refer to the 97 | latest patch series, e.g.: ``-t -1`` refers to the last patch series. 98 | It also accepts ``all``. 99 | 100 | ``-d DISCARD, --discard DISCARD`` 101 | From the listing generated by ``--list``, specify which thank-you 102 | notes should be discarded. This command accepts comma-separated values 103 | and ranges, including open-ended ranges, e.g.: ``-t 1,3,5-7,9-``. It 104 | also accepts ``all``. 105 | 106 | ``-a, --auto`` 107 | The auto-thankanator: uses patch-id and commit subject matching to 108 | figure out which tracked series or pull request have been applied to 109 | your tree. 110 | 111 | ``-b BRANCH, --branch BRANCH`` 112 | When using ``--auto``, specify which git branch should be used if not 113 | the currently active branch. 114 | 115 | ``--since SINCE`` 116 | When using ``--auto``, this lets you adjust how far back b4 will look 117 | to find your own commits. Takes the same format as ``--since`` flags 118 | passed to git, with the default of ``1.week``. 119 | 120 | ``-S, --send-email`` 121 | Instead of writing .thanks files, send the email directly. Requires 122 | that the ``sendemail`` section is present in your git configuration. 123 | 124 | ``--dry-run`` 125 | When used with ``-S``, will not actually send email, just print them 126 | out to stdout. 127 | 128 | ``--pw-set-state PW_SET_STATE`` 129 | When patchwork integration is configured, sets the specified patchwork 130 | state instead of the default specified in config settings (use with 131 | -a, -t or -d). See :ref:`patchwork_settings` for more details. 132 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | # Defining the exact version will make sure things don't break 2 | sphinx==5.3.0 3 | sphinx_rtd_theme==1.1.1 4 | readthedocs-sphinx-search==0.1.1 5 | -------------------------------------------------------------------------------- /misc/default.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | # This is what we describe ourselves as in messages 3 | myname = B4 Web Endpoint 4 | # The URL to the submission endpoint 5 | myurl = http://localhost:8000/_b4_submit 6 | # This must be in a format that is understood by SQLAlchemy, and you obviously 7 | # don't want to use the default, which gets lost every time the app is restarted 8 | dburl = sqlite:///:memory: 9 | # These are the domains for which we have DKIM signing capabilities, so if we 10 | # receive a submission with that domain in From, we don't have to do any 11 | # in-body From substitution, Reply-To tricks, etc. 12 | mydomains = kernel.org, linux.dev 13 | # If we're processing a message that's not from one of our own domains, 14 | # we will fudge the From: header to be whatever is defined below in 15 | # sendemail.from. By default, we will tack on the original address of the 16 | # sender (slightly fudged) after the local part, using + (see 17 | # 'recipient_delimiter' in Postfix). 18 | # E.g.: 19 | # From: joe@example.org 20 | # becomes 21 | # From: devnull+joe.example.org@kernel.org 22 | # This is done so various automated tools that don't pay attention to 23 | # X-Original-From don't show these messages as all from the same account. 24 | from-recipient-delimiter = + 25 | # One of the To: or Cc: addrs must match this regex 26 | # (to ensure that the message was intended to go to mailing lists) 27 | mustdest = .*@(vger\.kernel\.org|lists\.linux\.dev|lists\.infradead\.org) 28 | 29 | # Always bcc the address(es) listed here, separated by comma 30 | # Useful during initial testing 31 | #alwaysbcc = one@example.com, two@example.com 32 | # If dryrun is set, the messages are printed to stdout instead of 33 | # being actually sent out. Useful for testing. 34 | #dryrun = false 35 | # Where to write our app-specific logs. Make sure it's writable by the 36 | # web process. 37 | #logfile = /var/log/somewhere.log 38 | # Can be "info", "debug", "critical" 39 | #loglevel = info 40 | 41 | # This section matches the git's sendemail section one-for-one 42 | [sendemail] 43 | from = Web Endpoint 44 | smtpserver = localhost 45 | smtpserverport = 25 46 | #smtpencryption = 47 | #smtpuser = 48 | #smtppass = 49 | 50 | # information about the public-inbox feed we'll be writing to 51 | # NOTE: we won't init the git repository, so make sure it's present 52 | [public-inbox] 53 | # Path to the public-inbox git repository. If there is a hooks/post-commit, 54 | # we will execute it after writing a new batch of messages to the repo. 55 | repo = 56 | # This is required for public-inbox to work correctly 57 | listid = Web Submitted Patches 58 | 59 | [templates] 60 | verify-subject = Web endpoint verification for $${identity} 61 | verify-body = Dear $${name}: 62 | 63 | Somebody, probably you, initiated a web endpoint verification routine 64 | for patch submissions at: $${myurl} 65 | 66 | If you have no idea what is going on, please ignore this message 67 | Otherwise, please follow instructions provided by your tool and paste 68 | the following string: 69 | 70 | $${challenge} 71 | 72 | Happy patching! 73 | 74 | signature = Deet-doot-dot, I am a bot! 75 | https://korg.docs.kernel.org 76 | 77 | -------------------------------------------------------------------------------- /misc/requirements-completion.in: -------------------------------------------------------------------------------- 1 | shtab>=1.7 2 | -------------------------------------------------------------------------------- /misc/retrieve_lore_thread.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from instructor import OpenAISchema 4 | from pydantic import Field 5 | 6 | # This is needed for now while the minimization bits aren't released 7 | sys.path.insert(0, '/home/user/work/git/korg/b4/src') 8 | import b4 9 | import b4.mbox 10 | 11 | 12 | class Function(OpenAISchema): 13 | """ 14 | Accepts a message-id, retrieves a mailing list discussion thread from lore.kernel.org, and returns a mailbox with all messages in the tread. 15 | """ 16 | 17 | message_id: str = Field( 18 | ..., 19 | example='20240228-foo-bar-baz@localhost', 20 | descriptions='Message-ID of the thread to retrieve from lore.kernel.org', 21 | ) 22 | 23 | class Config: 24 | title = "retrieve_lore_thread" 25 | 26 | @classmethod 27 | def execute(cls, message_id: str) -> str: 28 | b4._setup_main_config() 29 | msgs = b4.get_pi_thread_by_msgid(message_id, with_thread=True) 30 | if not msgs: 31 | return f'No messages matching this message-id: {message_id}' 32 | minmsgs = b4.mbox.minimize_thread(msgs) 33 | out = '' 34 | for minmsg in minmsgs: 35 | out += minmsg.as_string(policy=b4.emlpolicy) + '\n' 36 | return out 37 | -------------------------------------------------------------------------------- /misc/tc-generate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Generate tab-complete files for use with bash, zsh, tcsh 3 | # E.g.: 4 | # ./misc/tc-generate.sh bash > /tmp/b4 5 | # sudo cp /tmp/b4 /usr/share/bash-completion/completions/b4 6 | # 7 | # Requires shtab (python3-shtab) 8 | # 9 | if [[ -z $1 ]]; then 10 | echo "Specify the shell type as parameter (bash, zsh, tcsh)" 11 | exit 1 12 | fi 13 | 14 | REAL_PATH=$(realpath -e ${BASH_SOURCE[0]}) 15 | PROJ_TOP="${PROJ_TOP:-$(dirname ${REAL_PATH})}" 16 | while [[ ${PROJ_TOP} != "/" ]]; do 17 | if [[ -d ${PROJ_TOP}/src/b4 ]]; then 18 | break 19 | fi 20 | PROJ_TOP=$(dirname ${PROJ_TOP}) 21 | done 22 | if [[ $PROJ_TOP == "/" ]]; then 23 | echo "Please run me from the b4 project directory." 24 | exit 1 25 | fi 26 | 27 | if which shtab >/dev/null 2>&1; then 28 | PYTHONPATH="${PROJ_TOP}/src${PYTHONPATH:+:$PYTHONPATH}" \ 29 | shtab --shell=$1 -u b4.command.setup_parser 30 | else 31 | echo "Install shtab to generate tab-completion files." 32 | exit 1 33 | fi -------------------------------------------------------------------------------- /plan.otl: -------------------------------------------------------------------------------- 1 | v0.15 2 | ----- 3 | [_] `b4 review` similar to `b4 prep` 4 | [_] Retrieve series and apply to a branch 5 | [_] Use empty commit for cover letter and review state tracking 6 | [_] Simple edit mode a-la "git rebase -i" that lets you apply trailers to patches 7 | [ ] `b4 ty` interactive mode 8 | [_] Similar to above, a mode to review auto-ty messages and drop false-positives 9 | [ ] `b4 trailers` interactive mode 10 | [_] Similar to above, a mode to review incoming trailers 11 | 12 | v0.14 13 | ----- 14 | [X] Switch to using pyproject.toml 15 | [X] Automatic dependency resolution 16 | [X] Retrieve dependencies using the standard prerequisite-patch-id 17 | [X] Define the prerequisite-change-id trailer 18 | [X] Expand prerequisite-change-id into prerequisite-patch-id for locally sent series 19 | [X] Add b4 prep --edit-deps to open an editor with dependencies 20 | [X] Add b4 prep --check-deps to report if there are problems or updates available 21 | [X] Expand non-local change-id and message-id deps into prerequisite-patch-id 22 | [X] --check-deps should check if everything can be cleanly applied 23 | [X] Checkpatch and other pre-submit checks 24 | [X] Configurable checks to run on each patch 25 | [X] When checks are not defined, use Linux kernel defaults 26 | [X] Display checkpatch checks using output similar to CI checks 27 | [X] Cache checks for commits that haven't changed if the check command is the same 28 | [X] Add --check to am/shazam and display checkpatch report 29 | [X] Run b4-specific checks automatically (needs-editing, needs-auto-to-cc) 30 | [X] Refuse to send if checks haven't been run 31 | [X] Allow turning off pre-flight check all together, or by individual check 32 | [X] Document new features 33 | [X] prep --check 34 | [X] Series dependencies overview 35 | [X] prep --edit-deps 36 | [X] prep --check-deps 37 | [X] Pre-flight checks overview 38 | [X] How to turn off pre-flight checks 39 | [X] Document config file changes (am-perpatch-check-cmd, prep-perpatch-check-cmd, etc) 40 | [X] Update manpages 41 | [X] Miscellaneous enhancements 42 | [X] Add prep --add-prefixes 43 | [X] Add trailers --since-commit 44 | [X] Automatically no-parent standalone patches in the middle of long threads 45 | [X] Prevent overwriting cover letters when the tree changes while editing 46 | [X] More bug avoidance in send-receive for python SMTP implementations 47 | [X] Add ability to specify DNS resolvers for DKIM 48 | [X] Add tab-completion generation with shtab 49 | [X] Allow inserting a range-diff into the cover letter 50 | [X] Use hashed requirements for added security and reproducible installs 51 | [X] Introduce the -i switch to am/shazam to insert the Message-ID trailer 52 | 53 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [project] 6 | name = "b4" 7 | version = "0.15-dev" 8 | description = "A tool to work with public-inbox and patch archives" 9 | readme = "README.rst" 10 | keywords = ["git", "public-inbox", "lore.kernel.org", "patch", "email", "workflow"] 11 | license = {file = "COPYING"} 12 | authors = [ 13 | {name = "Konstantin Ryabitsev", email="konstantin@linuxfoundation.org"}, 14 | ] 15 | requires-python = ">=3.8" 16 | classifiers = [ 17 | "Environment :: Console", 18 | "Operating System :: POSIX :: Linux", 19 | "Intended Audience :: Developers", 20 | "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", 21 | "Topic :: Communications :: Email", 22 | "Topic :: Software Development", 23 | "Topic :: Utilities", 24 | ] 25 | dynamic = ["dependencies"] 26 | 27 | [project.optional-dependencies] 28 | dev = [ 29 | "pytest", 30 | "types-requests", 31 | ] 32 | shtab = [ 33 | "shtab", 34 | ] 35 | 36 | [tool.setuptools.dynamic] 37 | dependencies = { file = ["requirements.in"] } 38 | 39 | [tool.setuptools.dynamic.optional-dependencies] 40 | completion = { file = ["misc/requirements-completion.in"] } 41 | 42 | [tool.setuptools.packages.find] 43 | where = ['src'] 44 | exclude = ['tests*'] 45 | 46 | [tool.pip-tools] 47 | generate_hashes = true 48 | 49 | [project.urls] 50 | Homepage = "https://git.kernel.org/pub/scm/utils/b4/b4.git/" 51 | Repository = "https://git.kernel.org/pub/scm/utils/b4/b4.git" 52 | Documentation = "https://b4.docs.kernel.org/" 53 | 54 | [project.scripts] 55 | b4 = "b4.command:cmd" 56 | 57 | [tool.pytest.ini_options] 58 | filterwarnings = "ignore:.*(pyopenssl|invalid escape sequence).*:DeprecationWarning" 59 | norecursedirs = "tests/helpers" 60 | log_file = "pytest.log" 61 | log_file_level = "DEBUG" 62 | log_file_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)" 63 | log_file_date_format = "%Y-%m-%d %H:%M:%S" 64 | 65 | [tool.bumpversion] 66 | current_version = "0.15-dev" 67 | files = [ 68 | {filename = "src/b4/__init__.py"}, 69 | {filename = "src/b4/man/b4.5.rst"}, 70 | {filename = "src/b4/man/b4.5"}, 71 | ] 72 | -------------------------------------------------------------------------------- /requirements.in: -------------------------------------------------------------------------------- 1 | requests>=2.24,<3.0 2 | git-filter-repo>=2.30,<3.0 3 | dkimpy>=1.0,<2.0 4 | patatt>=0.6,<2.0 5 | -------------------------------------------------------------------------------- /src/b4/diff.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | # Copyright (C) 2020 by the Linux Foundation 5 | # 6 | __author__ = 'Konstantin Ryabitsev ' 7 | 8 | import os 9 | import sys 10 | import b4 11 | import b4.mbox 12 | import email 13 | import email.parser 14 | import shutil 15 | import pathlib 16 | import argparse 17 | import shlex 18 | 19 | from typing import Tuple, Optional, List 20 | from email.message import EmailMessage 21 | 22 | logger = b4.logger 23 | 24 | 25 | def diff_same_thread_series(cmdargs: argparse.Namespace) -> Tuple[Optional[b4.LoreSeries], Optional[b4.LoreSeries]]: 26 | msgid = b4.get_msgid(cmdargs) 27 | if not msgid: 28 | logger.critical('Please pass msgid on the command-line') 29 | sys.exit(1) 30 | wantvers = cmdargs.wantvers 31 | if wantvers and len(wantvers) > 2: 32 | logger.critical('Can only compare two versions at a time') 33 | sys.exit(1) 34 | 35 | # start by grabbing the mbox provided 36 | # Do we have a cache of this lookup? 37 | identifier = msgid 38 | if wantvers: 39 | identifier += '-' + '-'.join([str(x) for x in wantvers]) 40 | 41 | cachedir = b4.get_cache_file(identifier, suffix='diff.msgs') 42 | msgs: Optional[List[EmailMessage]] 43 | if os.path.exists(cachedir) and not cmdargs.nocache: 44 | logger.info('Using cached copy of the lookup') 45 | msgs = list() 46 | for cachemsg in os.listdir(cachedir): 47 | with open(os.path.join(cachedir, cachemsg), 'rb') as fh: 48 | msgs.append(email.parser.BytesParser(policy=b4.emlpolicy, _class=EmailMessage).parse(fh)) 49 | else: 50 | msgs = b4.get_pi_thread_by_msgid(msgid, nocache=cmdargs.nocache) 51 | if not msgs: 52 | logger.critical('Unable to retrieve thread: %s', msgid) 53 | return None, None 54 | msgs = b4.mbox.get_extra_series(msgs, direction=-1, wantvers=wantvers) 55 | if os.path.exists(cachedir): 56 | shutil.rmtree(cachedir) 57 | pathlib.Path(cachedir).mkdir(parents=True) 58 | at = 0 59 | for msg in msgs: 60 | with open(os.path.join(cachedir, '%04d' % at), 'wb') as fh: 61 | fh.write(msg.as_bytes(policy=b4.emlpolicy)) 62 | at += 1 63 | 64 | count = len(msgs) 65 | logger.info('---') 66 | logger.info('Analyzing %s messages in the thread', count) 67 | lmbx = b4.LoreMailbox() 68 | for msg in msgs: 69 | lmbx.add_message(msg) 70 | 71 | if not len(lmbx.series): 72 | logger.critical('Could not find any patches in the series.') 73 | sys.exit(1) 74 | 75 | if wantvers and len(wantvers) == 1: 76 | upper = max(lmbx.series.keys()) 77 | lower = wantvers[0] 78 | elif wantvers and len(wantvers) == 2: 79 | upper = max(wantvers) 80 | lower = min(wantvers) 81 | else: 82 | upper = max(lmbx.series.keys()) 83 | lower = upper 84 | while True: 85 | lower -= 1 86 | if lower in lmbx.series: 87 | break 88 | if lower < 1: 89 | logger.critical('Could not find lower series to compare against.') 90 | sys.exit(1) 91 | 92 | if upper == lower: 93 | logger.critical('ERROR: Could not auto-find previous revision') 94 | logger.critical(' Run "b4 am -T" manually, then "b4 diff -m mbx1 mbx2"') 95 | return None, None 96 | 97 | if upper not in lmbx.series: 98 | return None, None 99 | 100 | if lower not in lmbx.series: 101 | return None, None 102 | 103 | if not lmbx.series[lower].complete: 104 | lmbx.partial_reroll(lower, sloppytrailers=False) 105 | 106 | if not lmbx.series[upper].complete: 107 | lmbx.partial_reroll(upper, sloppytrailers=False) 108 | 109 | return lmbx.series[lower], lmbx.series[upper] 110 | 111 | 112 | def diff_mboxes(cmdargs: argparse.Namespace) -> Tuple[Optional[b4.LoreSeries], Optional[b4.LoreSeries]]: 113 | chunks = list() 114 | for mboxfile in cmdargs.ambox: 115 | if not os.path.exists(mboxfile): 116 | logger.critical('Cannot open %s', mboxfile) 117 | sys.exit(1) 118 | 119 | mb_msgs = b4.get_msgs_from_mailbox_or_maildir(mboxfile) 120 | count = len(mb_msgs) 121 | 122 | logger.info('Loading %s messages from %s', count, mboxfile) 123 | lmbx = b4.LoreMailbox() 124 | for msg in mb_msgs: 125 | lmbx.add_message(msg) 126 | if len(lmbx.series) < 1: 127 | logger.critical('No valid patches found in %s', mboxfile) 128 | sys.exit(1) 129 | if len(lmbx.series) > 1: 130 | logger.critical('More than one series version in %s, will use latest', mboxfile) 131 | 132 | chunks.append(lmbx.series[max(lmbx.series.keys())]) 133 | 134 | return chunks[0], chunks[1] 135 | 136 | 137 | def main(cmdargs: argparse.Namespace) -> None: 138 | if cmdargs.ambox is not None: 139 | lser, user = diff_mboxes(cmdargs) 140 | else: 141 | lser, user = diff_same_thread_series(cmdargs) 142 | 143 | if lser is None or user is None: 144 | sys.exit(1) 145 | 146 | # Prepare the lower fake-am range 147 | lsc, lec = lser.make_fake_am_range(gitdir=cmdargs.gitdir) 148 | if lsc is None or lec is None: 149 | logger.critical('---') 150 | logger.critical('Could not create fake-am range for lower series v%s', lser.revision) 151 | sys.exit(1) 152 | # Prepare the upper fake-am range 153 | usc, uec = user.make_fake_am_range(gitdir=cmdargs.gitdir) 154 | if usc is None or uec is None: 155 | logger.critical('---') 156 | logger.critical('Could not create fake-am range for upper series v%s', user.revision) 157 | sys.exit(1) 158 | rd_opts = [] 159 | if cmdargs.range_diff_opts: 160 | sp = shlex.shlex(cmdargs.range_diff_opts, posix=True) 161 | sp.whitespace_split = True 162 | rd_opts = list(sp) 163 | grdcmd = 'git range-diff %s%.12s..%.12s %.12s..%.12s' % ( 164 | " ".join(rd_opts) + " " if rd_opts else "", 165 | lsc, lec, usc, uec) 166 | if cmdargs.nodiff: 167 | logger.info('Success, to compare v%s and v%s:', lser.revision, user.revision) 168 | logger.info(f' {grdcmd}') 169 | sys.exit(0) 170 | logger.info('---') 171 | logger.info('Diffing v%s and v%s', lser.revision, user.revision) 172 | logger.info(' Running: %s', grdcmd) 173 | gitargs = ['range-diff'] + rd_opts + [f'{lsc}..{lec}', f'{usc}..{uec}'] 174 | if cmdargs.outdiff is None or cmdargs.color: 175 | gitargs.append('--color') 176 | ecode, rdiff = b4.git_run_command(cmdargs.gitdir, gitargs) 177 | if ecode > 0: 178 | logger.critical('Unable to generate diff') 179 | logger.critical('Try running it yourself:') 180 | logger.critical(f' {grdcmd}') 181 | sys.exit(1) 182 | if cmdargs.outdiff is not None: 183 | logger.info('Writing %s', cmdargs.outdiff) 184 | with open(cmdargs.outdiff, 'w') as fh: 185 | fh.write(rdiff) 186 | else: 187 | logger.info('---') 188 | sys.stdout.write(rdiff) 189 | -------------------------------------------------------------------------------- /src/b4/kr.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | # Copyright (C) 2020-2021 by the Linux Foundation 5 | # 6 | __author__ = 'Konstantin Ryabitsev ' 7 | 8 | import os 9 | import sys 10 | import pathlib 11 | import re 12 | 13 | import b4 14 | 15 | logger = b4.logger 16 | 17 | 18 | def main(cmdargs): 19 | if cmdargs.showkeys: 20 | msgid, msgs = b4.retrieve_messages(cmdargs) 21 | logger.info('---') 22 | try: 23 | import patatt 24 | except ModuleNotFoundError: 25 | logger.info('--show-keys requires the patatt library') 26 | sys.exit(1) 27 | 28 | keydata = set() 29 | for msg in msgs: 30 | xdk = msg.get('x-developer-key') 31 | xds = msg.get('x-developer-signature') 32 | if not xdk or not xds: 33 | continue 34 | # grab the selector they used 35 | kdata = b4.LoreMessage.get_parts_from_header(xdk) 36 | sdata = b4.LoreMessage.get_parts_from_header(xds) 37 | algo = kdata.get('a') 38 | identity = kdata.get('i') 39 | selector = sdata.get('s', 'default') 40 | if algo == 'openpgp': 41 | keyinfo = kdata.get('fpr') 42 | elif algo == 'ed25519': 43 | keyinfo = kdata.get('pk') 44 | else: 45 | logger.debug('Unknown key type: %s', algo) 46 | continue 47 | keydata.add((identity, algo, selector, keyinfo)) 48 | 49 | if not keydata: 50 | logger.info('No keys found in the thread.') 51 | sys.exit(0) 52 | krpath = os.path.join(b4.get_data_dir(), 'keyring') 53 | pgp = False 54 | ecc = False 55 | for identity, algo, selector, keyinfo in keydata: 56 | keypath = patatt.make_pkey_path(algo, identity, selector) 57 | fullpath = os.path.join(krpath, keypath) 58 | if os.path.exists(fullpath): 59 | status = 'known' 60 | else: 61 | status = 'unknown' 62 | if algo == 'openpgp': 63 | try: 64 | uids = b4.get_gpg_uids(keyinfo) 65 | if len(uids): 66 | status = 'in default keyring' 67 | except KeyError: 68 | pass 69 | pathlib.Path(os.path.dirname(fullpath)).mkdir(parents=True, exist_ok=True) 70 | 71 | logger.info('%s: (%s)', identity, status) 72 | logger.info(' keytype: %s', algo) 73 | if algo == 'openpgp': 74 | pgp = True 75 | logger.info(' keyid: %s', keyinfo[-16:]) 76 | logger.info(' fpr: %s', ':'.join(re.findall(r'.{4}', keyinfo))) 77 | else: 78 | ecc = True 79 | logger.info(' pubkey: %s', keyinfo) 80 | logger.info(' krpath: %s', keypath) 81 | logger.info(' fullpath: %s', fullpath) 82 | logger.info('---') 83 | if pgp: 84 | logger.info('For openpgp keys:') 85 | logger.info(' gpg --recv-key [keyid]') 86 | logger.info(' gpg -a --export [keyid] > [fullpath]') 87 | if ecc: 88 | logger.info('For ed25519 keys:') 89 | logger.info(' echo [pubkey] > [fullpath]') 90 | 91 | sys.exit(0) 92 | 93 | logger.info('This command is experimental. Try --show-keys [msgid].') 94 | -------------------------------------------------------------------------------- /src/b4/man/b4.1: -------------------------------------------------------------------------------- 1 | .\" Man page generated from reStructuredText. 2 | . 3 | . 4 | .nr rst2man-indent-level 0 5 | . 6 | .de1 rstReportMargin 7 | \\$1 \\n[an-margin] 8 | level \\n[rst2man-indent-level] 9 | level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] 10 | - 11 | \\n[rst2man-indent0] 12 | \\n[rst2man-indent1] 13 | \\n[rst2man-indent2] 14 | .. 15 | .de1 INDENT 16 | .\" .rstReportMargin pre: 17 | . RS \\$1 18 | . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] 19 | . nr rst2man-indent-level +1 20 | .\" .rstReportMargin post: 21 | .. 22 | .de UNINDENT 23 | . RE 24 | .\" indent \\n[an-margin] 25 | .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] 26 | .nr rst2man-indent-level -1 27 | .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] 28 | .in \\n[rst2man-indent\\n[rst2man-indent-level]]u 29 | .. 30 | .TH "B4" "1" "2024-06-10" "0.14-dev" 31 | .SH NAME 32 | B4 \- Work with code submissions in a public-inbox archive 33 | .SH SYNOPSIS 34 | .sp 35 | b4 {mbox,am,shazam,pr,diff,ty,kr,prep,send,trailers} [options] 36 | .SH DESCRIPTION 37 | .sp 38 | This is a helper utility to work with patches and pull requests made 39 | available via a public\-inbox archive like lore.kernel.org. It\(aqs 40 | written to make it simpler to participate in patch\-based workflows, 41 | like those used in the Linux kernel development. 42 | .sp 43 | The name \(dqb4\(dq was chosen for ease of typing and because B\-4 was the 44 | precursor to Lore and Data in the Star Trek universe. 45 | .sp 46 | Full documentation is available on \&. 47 | .SH SUBCOMMANDS 48 | .sp 49 | Maintainer\-oriented: 50 | .INDENT 0.0 51 | .IP \(bu 2 52 | \fImbox\fP: Download a thread as an mbox file 53 | .IP \(bu 2 54 | \fIam\fP: Create an mbox file that is ready to git\-am 55 | .IP \(bu 2 56 | \fIshazam\fP: Apply patch series to git repositories 57 | .IP \(bu 2 58 | \fIpr\fP: Work with pull requests 59 | .IP \(bu 2 60 | \fIty\fP: Create templated replies for processed patches and pull requests 61 | .IP \(bu 2 62 | \fIdiff\fP: Show range\-diff style diffs between patch versions 63 | .IP \(bu 2 64 | \fIkr\fP: (STUB) Operate on patatt\-compatible keyrings 65 | .UNINDENT 66 | .sp 67 | Contributor\-oriented: 68 | .INDENT 0.0 69 | .IP \(bu 2 70 | \fIprep\fP: prepare your series for submission 71 | .IP \(bu 2 72 | \fItrailers\fP: retrieve and apply code\-review trailers 73 | .IP \(bu 2 74 | \fIsend\fP: send your series for review on distribution lists 75 | .UNINDENT 76 | .sp 77 | For full options and what they do, please see \fBb4 \-\-help\fP and \fBb4 78 | subcommand \-\-help\fP\&. 79 | .SS b4 mbox 80 | .sp 81 | This command allows retrieving entire threads from a remote public\-inbox 82 | instance. You can open the resulting mbox file with most mail clients 83 | for actions like replying to conversations or reviewing patch 84 | submissions. 85 | .sp 86 | You can provide the message either as a msgid, as full URL to a 87 | public\-inbox archive, or you can pipe it on stdin. 88 | .sp 89 | For options and their descriptions, see \fBb4 mbox \-\-help\fP\&. 90 | .sp 91 | \fIExamples\fP 92 | .INDENT 0.0 93 | .TP 94 | .B \fBb4 mbox [msgid]\fP 95 | Download a thread from the default public\-inbox server and save it in 96 | the current directory as a .mbox file. 97 | .TP 98 | .B \fBb4 mbox \-m ~/Mail [msgid]\fP 99 | Download a thread from your ~/Mail folder and save it in the current 100 | directlry as a .mbox file. 101 | .TP 102 | .B \fBb4 mbox \-fo ~/Mail [public\-inbox\-url]\fP 103 | Download the thread from this public\-inbox server, and add it to your 104 | existing mailbox, filtering out any dupes already in your mailbox 105 | folder. 106 | .UNINDENT 107 | .SS b4 am 108 | .sp 109 | This command allows retrieving threads from a public\-inbox instance and 110 | preparing them for applying to a git repository using the \(dqgit am\(dq 111 | command. It will automatically perform the following operations: 112 | .INDENT 0.0 113 | .IP \(bu 2 114 | pick the latest submitted version of the series (it can check for 115 | newer threads using \fB\-c\fP as well) 116 | .IP \(bu 2 117 | check DKIM signatures and patatt attestation on all patches and code 118 | review messages 119 | .IP \(bu 2 120 | collate all submitted code\-review trailers (Reviewed\-by, Acked\-by, 121 | etc) and put them into the commit message 122 | .IP \(bu 2 123 | add your own Signed\-off\-by trailer (with \fB\-s\fP) 124 | .IP \(bu 2 125 | reroll series from partial updates (e.g. someone submits a v2 of a 126 | single patch instead of rerolling the entire series) 127 | .IP \(bu 2 128 | guess where in the tree history the patches belong, if the exact 129 | commit\-base is not specified (with \fB\-g\fP) 130 | .IP \(bu 2 131 | prepare the tree for a 3\-way merge (with \fB\-3\fP) 132 | .IP \(bu 2 133 | cherry\-pick a subset of patches from a large series (with \fB\-P\fP) 134 | .UNINDENT 135 | .sp 136 | Note: Unless you intend to do some preparatory work on the series before 137 | applying it to the git repository (e.g. a 3\-way merge), you should 138 | consider using \fBb4 shazam\fP to apply the retrieved series. 139 | .sp 140 | For options and their descriptions, see \fBb4 am \-\-help\fP\&. 141 | .sp 142 | \fIExamples\fP 143 | .INDENT 0.0 144 | .TP 145 | .B \fBb4 am \-sl [msgid]\fP 146 | Download a thread from the default public\-inbox server, apply any 147 | follow\-up trailers, add your own Signed\-Off\-By trailer plus a Link: 148 | trailer indicating the origin of the patch, then save the resulting 149 | \&.mbox file in the current directory ready to be applied by \(dqgit am\(dq. 150 | .TP 151 | .B \fBb4 am \-sl \-P 1\-3 [msgid]\fP 152 | Same as the previous example, but pick only patches 1,2,3 from the 153 | entire series. 154 | .TP 155 | .B \fBb4 am \-3 [msgid]\fP 156 | Download the series and prepare the local git tree for a 3\-way merge 157 | by ensuring that all index blobs exist. 158 | .TP 159 | .B \fBb4 am \-\-check [msgid]\fP 160 | Download the series and show if it passes the checks. You can specify 161 | the command using the \fBb4.am\-perpatch\-check\-cmd\fP configuration 162 | option. For the Linux kernel, the default will be the most common 163 | \fBcheckpatch.pl\fP set of options. 164 | .UNINDENT 165 | .SS b4 shazam 166 | .sp 167 | This is very similar to \fBb4 am\fP, but will also apply patches 168 | directly to the current git tree using \fBgit am\fP\&. Alternatively, when 169 | used with \fB\-H\fP, it can fetch the patch series into \fBFETCH_HEAD\fP as 170 | if it were a pull request, ready to review and merge. B4 uses the cover 171 | letter as a template for the merge commit. 172 | .sp 173 | If you want to automatically invoke git\-merge, you can use \fB\-M\fP 174 | instead of \fB\-H\fP\&. B4 automatically opens up the editor allowing you to 175 | edit the merge commit message. 176 | .sp 177 | Note: the \fB\-M\fP and \fB\-H\fP options work best for series that have the 178 | \fBbase\-commit\fP info matching an object in your local tree. 179 | .sp 180 | For options and their descriptions, see \fBb4 shazam \-\-help\fP\&. 181 | .sp 182 | \fIExamples\fP 183 | .INDENT 0.0 184 | .TP 185 | .B \fBb4 shazam \-sl \-M [msgid]\fP 186 | Download a thread from the default public\-inbox server, apply any 187 | follow\-up trailers, add your own Signed\-Off\-By trailer plus a Link: 188 | trailer with the origin of the patch, then merge this commit 189 | to the current git repository using the cover letter as the merge 190 | commit template. 191 | .TP 192 | .B \fBb4 shazam \-sl \-M \-\-merge\-base v6.4\-rc4 [msgid]\fP 193 | Same as the previous example, but forces the merge\-base to be the 194 | commit\-ish object provided instead of the one listed in the patch 195 | series itself. 196 | .UNINDENT 197 | .SS b4 pr 198 | .sp 199 | This command is for working with pull requests submitted using 200 | \fBgit\-request\-pull\fP\&. It provides the following benefits as opposed to using git directly: 201 | .INDENT 0.0 202 | .IP \(bu 2 203 | it can check if the pull is already applied before performing a git 204 | fetch 205 | .IP \(bu 2 206 | it checks the signature on the tag or tip commit specified in the pull 207 | request 208 | .IP \(bu 2 209 | it can track applied pull requests and send replies to submitters 210 | using \fBb4 ty\fP 211 | .UNINDENT 212 | .sp 213 | For options and their descriptions, see \fBb4 pr \-\-help\fP\&. 214 | .sp 215 | \fIExamples\fP 216 | .INDENT 0.0 217 | .TP 218 | .B \fBb4 pr [msgid]\fP 219 | Download the message with the pull\-request and apply it to the current 220 | git tree. 221 | .UNINDENT 222 | .SS b4 ty 223 | .sp 224 | If you\(aqve retrieved and applied some patches to your tree, you should be 225 | able to fire up the “auto\-thankanator”, which uses patch\-id and commit 226 | subject tracking to figure out which series from those you have 227 | retrieved you already applied to your tree. The process is usually 228 | pretty fast and fairly accurate. 229 | .sp 230 | To send mails directly using \fB\-S\fP, you should have a configured 231 | \fB[sendemail]\fP section somewhere in your applicable git configuration 232 | files. By default, \fBb4 ty\fP writes out .thanks files in the current 233 | directly that you can edit and sent out using a command like \fBmutt \-f 234 | thanks.file\fP\&. 235 | .sp 236 | For options and their descriptions, see \fBb4 ty \-\-help\fP\&. 237 | .sp 238 | \fIExamples\fP 239 | .INDENT 0.0 240 | .TP 241 | .B \fBb4 ty \-a \-S\fP 242 | Locate any retrieved series that you have applied to the current git 243 | repository and send out thanks to all members of the conversation. 244 | .TP 245 | .B \fBb4 ty \-a \-S \-\-dry\-run\fP 246 | Same as above, but instead of actually sending it out show what the 247 | message is going to be, first. 248 | .UNINDENT 249 | .SS b4 diff 250 | .sp 251 | The diff subcommand allows comparing two different revisions of the same 252 | patch series using \fBgit range\-diff\fP\&. Note, that in order to perform 253 | the range\-diff comparison, both revisions need to cleanly apply to the 254 | current tree, which may not always be possible to achieve. 255 | .sp 256 | For options and their descriptions, see \fBb4 diff \-\-help\fP\&. 257 | .sp 258 | \fIExamples\fP 259 | .INDENT 0.0 260 | .TP 261 | .B \fBb4 diff [msgid\-of\-vN]\fP 262 | Retrieves the thread matching the msgid specified and attempts to 263 | auto\-locate the previous version of the series. If successful, shows 264 | the output of \fBgit range\-diff\fP comparing the patch differences. 265 | .UNINDENT 266 | .SS b4 kr 267 | .sp 268 | This subcommand allows maintaining a local keyring of contributor keys. 269 | .sp 270 | Note: this part of b4 is under active development with improvements 271 | planned for the near future. 272 | .sp 273 | For options and their descriptions, see \fBb4 kr \-\-help\fP\&. 274 | .sp 275 | \fIExamples\fP 276 | .INDENT 0.0 277 | .TP 278 | .B \fBb4 kr \-\-show\-keys [msgid]\fP 279 | Retrieve the thread specified and show any cryptographic keys used to 280 | attest the patches. 281 | .UNINDENT 282 | .SS b4 prep, trailers, send 283 | .sp 284 | These commands allow preparing and submitting a patch series for review 285 | on the mailing list. Full documentation is available online at the 286 | following address: 287 | .sp 288 | 289 | .sp 290 | For options, see the output of \fBb4 prep \-\-help\fP, \fBb4 trailers 291 | \-\-help\fP and \fBb4 send \-\-help\fP\&. 292 | .sp 293 | \fIExamples\fP 294 | .INDENT 0.0 295 | .TP 296 | .B \fBb4 prep \-n my\-new\-feature \-f v6.4\-rc4\fP 297 | Start a new branch, forking it from the tag \fBv6.4\-rc4\fP, and prepare 298 | it for adding more patches. 299 | .TP 300 | .B \fBb4 prep \-\-edit\-cover\fP 301 | Edit the cover letter for the current series. This step isn\(aqt 302 | required for most single\-patch submissions. 303 | .TP 304 | .B \fBb4 prep \-\-auto\-to\-cc\fP 305 | Find all addresses that need to receive a copy of the patch series 306 | submission and add them to the cover letter. 307 | .TP 308 | .B \fBb4 prep \-\-check\fP 309 | Run the configured checks on your series to identify any potential 310 | problems. For Linux kernel, this runs \fBcheckpatch.pl\fP with the 311 | recommended set of parameters. 312 | .TP 313 | .B \fBb4 send \-o /tmp/outdir\fP 314 | Generate the patches that b4 is going to send out and save them into 315 | the directory specified. This allows you to review the series before 316 | actually sending them. 317 | .TP 318 | .B \fBb4 send \-\-preview\-to [addr1@example.com addr2@example.com]\fP 319 | Send a \(dqpreview\(dq version of the series for someone to check before 320 | submitting it upstream. 321 | .TP 322 | .B \fBb4 trailers \-u\fP 323 | Retrieve any code\-review trailers provided for your series and apply 324 | them to the current branch. 325 | .UNINDENT 326 | .SH CONFIGURATION 327 | .sp 328 | B4 configuration is handled via git\-config(1), so you can store it in 329 | either the toplevel \fB$HOME/.gitconfig\fP file, or in a per\-repository 330 | \&.git/config file if your workflow changes per project. 331 | .sp 332 | To see configuration options available, see online documentation at 333 | 334 | .SH PROXYING REQUESTS 335 | .sp 336 | Commands making remote HTTP requests may be configured to use a proxy by 337 | setting the \fBHTTPS_PROXY\fP environment variable, as described in 338 | \&. 339 | .SH SUPPORT 340 | .sp 341 | Please email with support requests, or browse the list 342 | archive at \&. 343 | .SH AUTHOR 344 | mricon@kernel.org 345 | 346 | License: GPLv2+ 347 | .SH COPYRIGHT 348 | The Linux Foundation and contributors 349 | .\" Generated by docutils manpage writer. 350 | . 351 | -------------------------------------------------------------------------------- /src/b4/man/b4.1.rst: -------------------------------------------------------------------------------- 1 | B4 2 | == 3 | ---------------------------------------------------- 4 | Work with code submissions in a public-inbox archive 5 | ---------------------------------------------------- 6 | 7 | :Author: mricon@kernel.org 8 | :Date: 2024-06-10 9 | :Copyright: The Linux Foundation and contributors 10 | :License: GPLv2+ 11 | :Version: 0.14-dev 12 | :Manual section: 1 13 | 14 | SYNOPSIS 15 | -------- 16 | b4 {mbox,am,shazam,pr,diff,ty,kr,prep,send,trailers} [options] 17 | 18 | DESCRIPTION 19 | ----------- 20 | This is a helper utility to work with patches and pull requests made 21 | available via a public-inbox archive like lore.kernel.org. It's 22 | written to make it simpler to participate in patch-based workflows, 23 | like those used in the Linux kernel development. 24 | 25 | The name "b4" was chosen for ease of typing and because B-4 was the 26 | precursor to Lore and Data in the Star Trek universe. 27 | 28 | Full documentation is available on https://b4.docs.kernel.org/. 29 | 30 | SUBCOMMANDS 31 | ----------- 32 | Maintainer-oriented: 33 | 34 | * *mbox*: Download a thread as an mbox file 35 | * *am*: Create an mbox file that is ready to git-am 36 | * *shazam*: Apply patch series to git repositories 37 | * *pr*: Work with pull requests 38 | * *ty*: Create templated replies for processed patches and pull requests 39 | * *diff*: Show range-diff style diffs between patch versions 40 | * *kr*: (STUB) Operate on patatt-compatible keyrings 41 | 42 | Contributor-oriented: 43 | 44 | * *prep*: prepare your series for submission 45 | * *trailers*: retrieve and apply code-review trailers 46 | * *send*: send your series for review on distribution lists 47 | 48 | For full options and what they do, please see ``b4 --help`` and ``b4 49 | subcommand --help``. 50 | 51 | b4 mbox 52 | ~~~~~~~ 53 | 54 | This command allows retrieving entire threads from a remote public-inbox 55 | instance. You can open the resulting mbox file with most mail clients 56 | for actions like replying to conversations or reviewing patch 57 | submissions. 58 | 59 | You can provide the message either as a msgid, as full URL to a 60 | public-inbox archive, or you can pipe it on stdin. 61 | 62 | For options and their descriptions, see ``b4 mbox --help``. 63 | 64 | *Examples* 65 | 66 | ``b4 mbox [msgid]`` 67 | Download a thread from the default public-inbox server and save it in 68 | the current directory as a .mbox file. 69 | 70 | ``b4 mbox -m ~/Mail [msgid]`` 71 | Download a thread from your ~/Mail folder and save it in the current 72 | directlry as a .mbox file. 73 | 74 | ``b4 mbox -fo ~/Mail [public-inbox-url]`` 75 | Download the thread from this public-inbox server, and add it to your 76 | existing mailbox, filtering out any dupes already in your mailbox 77 | folder. 78 | 79 | 80 | b4 am 81 | ~~~~~ 82 | 83 | This command allows retrieving threads from a public-inbox instance and 84 | preparing them for applying to a git repository using the "git am" 85 | command. It will automatically perform the following operations: 86 | 87 | * pick the latest submitted version of the series (it can check for 88 | newer threads using ``-c`` as well) 89 | * check DKIM signatures and patatt attestation on all patches and code 90 | review messages 91 | * collate all submitted code-review trailers (Reviewed-by, Acked-by, 92 | etc) and put them into the commit message 93 | * add your own Signed-off-by trailer (with ``-s``) 94 | * reroll series from partial updates (e.g. someone submits a v2 of a 95 | single patch instead of rerolling the entire series) 96 | * guess where in the tree history the patches belong, if the exact 97 | commit-base is not specified (with ``-g``) 98 | * prepare the tree for a 3-way merge (with ``-3``) 99 | * cherry-pick a subset of patches from a large series (with ``-P``) 100 | 101 | Note: Unless you intend to do some preparatory work on the series before 102 | applying it to the git repository (e.g. a 3-way merge), you should 103 | consider using ``b4 shazam`` to apply the retrieved series. 104 | 105 | For options and their descriptions, see ``b4 am --help``. 106 | 107 | *Examples* 108 | 109 | ``b4 am -sl [msgid]`` 110 | Download a thread from the default public-inbox server, apply any 111 | follow-up trailers, add your own Signed-Off-By trailer plus a Link: 112 | trailer indicating the origin of the patch, then save the resulting 113 | .mbox file in the current directory ready to be applied by "git am". 114 | 115 | ``b4 am -sl -P 1-3 [msgid]`` 116 | Same as the previous example, but pick only patches 1,2,3 from the 117 | entire series. 118 | 119 | ``b4 am -3 [msgid]`` 120 | Download the series and prepare the local git tree for a 3-way merge 121 | by ensuring that all index blobs exist. 122 | 123 | ``b4 am --check [msgid]`` 124 | Download the series and show if it passes the checks. You can specify 125 | the command using the ``b4.am-perpatch-check-cmd`` configuration 126 | option. For the Linux kernel, the default will be the most common 127 | ``checkpatch.pl`` set of options. 128 | 129 | b4 shazam 130 | ~~~~~~~~~ 131 | 132 | This is very similar to **b4 am**, but will also apply patches 133 | directly to the current git tree using ``git am``. Alternatively, when 134 | used with ``-H``, it can fetch the patch series into ``FETCH_HEAD`` as 135 | if it were a pull request, ready to review and merge. B4 uses the cover 136 | letter as a template for the merge commit. 137 | 138 | If you want to automatically invoke git-merge, you can use ``-M`` 139 | instead of ``-H``. B4 automatically opens up the editor allowing you to 140 | edit the merge commit message. 141 | 142 | Note: the ``-M`` and ``-H`` options work best for series that have the 143 | ``base-commit`` info matching an object in your local tree. 144 | 145 | For options and their descriptions, see ``b4 shazam --help``. 146 | 147 | *Examples* 148 | 149 | ``b4 shazam -sl -M [msgid]`` 150 | Download a thread from the default public-inbox server, apply any 151 | follow-up trailers, add your own Signed-Off-By trailer plus a Link: 152 | trailer with the origin of the patch, then merge this commit 153 | to the current git repository using the cover letter as the merge 154 | commit template. 155 | 156 | ``b4 shazam -sl -M --merge-base v6.4-rc4 [msgid]`` 157 | Same as the previous example, but forces the merge-base to be the 158 | commit-ish object provided instead of the one listed in the patch 159 | series itself. 160 | 161 | b4 pr 162 | ~~~~~ 163 | This command is for working with pull requests submitted using 164 | ``git-request-pull``. It provides the following benefits as opposed to using git directly: 165 | 166 | * it can check if the pull is already applied before performing a git 167 | fetch 168 | * it checks the signature on the tag or tip commit specified in the pull 169 | request 170 | * it can track applied pull requests and send replies to submitters 171 | using ``b4 ty`` 172 | 173 | For options and their descriptions, see ``b4 pr --help``. 174 | 175 | *Examples* 176 | 177 | ``b4 pr [msgid]`` 178 | Download the message with the pull-request and apply it to the current 179 | git tree. 180 | 181 | b4 ty 182 | ~~~~~ 183 | If you've retrieved and applied some patches to your tree, you should be 184 | able to fire up the “auto-thankanator”, which uses patch-id and commit 185 | subject tracking to figure out which series from those you have 186 | retrieved you already applied to your tree. The process is usually 187 | pretty fast and fairly accurate. 188 | 189 | To send mails directly using ``-S``, you should have a configured 190 | ``[sendemail]`` section somewhere in your applicable git configuration 191 | files. By default, ``b4 ty`` writes out .thanks files in the current 192 | directly that you can edit and sent out using a command like ``mutt -f 193 | thanks.file``. 194 | 195 | For options and their descriptions, see ``b4 ty --help``. 196 | 197 | *Examples* 198 | 199 | ``b4 ty -a -S`` 200 | Locate any retrieved series that you have applied to the current git 201 | repository and send out thanks to all members of the conversation. 202 | 203 | ``b4 ty -a -S --dry-run`` 204 | Same as above, but instead of actually sending it out show what the 205 | message is going to be, first. 206 | 207 | b4 diff 208 | ~~~~~~~ 209 | The diff subcommand allows comparing two different revisions of the same 210 | patch series using ``git range-diff``. Note, that in order to perform 211 | the range-diff comparison, both revisions need to cleanly apply to the 212 | current tree, which may not always be possible to achieve. 213 | 214 | For options and their descriptions, see ``b4 diff --help``. 215 | 216 | *Examples* 217 | 218 | ``b4 diff [msgid-of-vN]`` 219 | Retrieves the thread matching the msgid specified and attempts to 220 | auto-locate the previous version of the series. If successful, shows 221 | the output of ``git range-diff`` comparing the patch differences. 222 | 223 | b4 kr 224 | ~~~~~ 225 | 226 | This subcommand allows maintaining a local keyring of contributor keys. 227 | 228 | Note: this part of b4 is under active development with improvements 229 | planned for the near future. 230 | 231 | For options and their descriptions, see ``b4 kr --help``. 232 | 233 | *Examples* 234 | 235 | ``b4 kr --show-keys [msgid]`` 236 | Retrieve the thread specified and show any cryptographic keys used to 237 | attest the patches. 238 | 239 | b4 prep, trailers, send 240 | ~~~~~~~~~~~~~~~~~~~~~~~ 241 | These commands allow preparing and submitting a patch series for review 242 | on the mailing list. Full documentation is available online at the 243 | following address: 244 | 245 | https://b4.docs.kernel.org/en/latest/contributor/overview.html 246 | 247 | For options, see the output of ``b4 prep --help``, ``b4 trailers 248 | --help`` and ``b4 send --help``. 249 | 250 | *Examples* 251 | 252 | ``b4 prep -n my-new-feature -f v6.4-rc4`` 253 | Start a new branch, forking it from the tag ``v6.4-rc4``, and prepare 254 | it for adding more patches. 255 | 256 | ``b4 prep --edit-cover`` 257 | Edit the cover letter for the current series. This step isn't 258 | required for most single-patch submissions. 259 | 260 | ``b4 prep --auto-to-cc`` 261 | Find all addresses that need to receive a copy of the patch series 262 | submission and add them to the cover letter. 263 | 264 | ``b4 prep --check`` 265 | Run the configured checks on your series to identify any potential 266 | problems. For Linux kernel, this runs ``checkpatch.pl`` with the 267 | recommended set of parameters. 268 | 269 | ``b4 send -o /tmp/outdir`` 270 | Generate the patches that b4 is going to send out and save them into 271 | the directory specified. This allows you to review the series before 272 | actually sending them. 273 | 274 | ``b4 send --preview-to [addr1@example.com addr2@example.com]`` 275 | Send a "preview" version of the series for someone to check before 276 | submitting it upstream. 277 | 278 | ``b4 trailers -u`` 279 | Retrieve any code-review trailers provided for your series and apply 280 | them to the current branch. 281 | 282 | CONFIGURATION 283 | ------------- 284 | B4 configuration is handled via git-config(1), so you can store it in 285 | either the toplevel ``$HOME/.gitconfig`` file, or in a per-repository 286 | .git/config file if your workflow changes per project. 287 | 288 | To see configuration options available, see online documentation at 289 | https://b4.docs.kernel.org/en/latest/config.html 290 | 291 | PROXYING REQUESTS 292 | ----------------- 293 | Commands making remote HTTP requests may be configured to use a proxy by 294 | setting the **HTTPS_PROXY** environment variable, as described in 295 | https://docs.python-requests.org/en/latest/user/advanced/#proxies. 296 | 297 | SUPPORT 298 | ------- 299 | Please email tools@kernel.org with support requests, or browse the list 300 | archive at https://lore.kernel.org/tools. 301 | -------------------------------------------------------------------------------- /src/b4/templates/shazam-merge-template.example: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' will be removed before invoking git-merge 2 | # This is the first line (title) of the merge 3 | # ${seriestitle}: will be a cleaned up subject of the cover 4 | # letter or the first patch in the series. 5 | # ${patch_or_series}: will say "patch" if a single patch or 6 | # "patch series" if more than one 7 | Merge ${patch_or_series} "${seriestitle}" 8 | 9 | ${authorname} <${authoremail}> says: 10 | 11 | # This will be the entirety of the cover letter minus anything 12 | # below the "-- \n" signature line. You will almost certainly 13 | # want to edit it down to only include the relevant info. 14 | ${covermessage} 15 | 16 | # This will contain a lore link to the patches in question 17 | Link: ${midurl} 18 | # git-merge will append any additional information here, depending 19 | # on the flags you used to invoke it (e.g. --log, --signoff, etc) 20 | -------------------------------------------------------------------------------- /src/b4/templates/thanks-am-template.example: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' will be removed 2 | # You can have two different templates for responding to 3 | # pull requests and for responding to patch series, though 4 | # in reality the difference will probably be one word: 5 | # "merged/pulled" vs. "applied". 6 | # Keeping it short and sweet is preferred. 7 | # 8 | On ${sentdate}, ${fromname} wrote: 9 | # quote will be limited to 5-6 lines, respecting paragraphs 10 | ${quote} 11 | 12 | # You can also use ${branch} and ${treename} if you set 13 | # b4.thanks-treename in your config, e.g.: 14 | #Applied to ${treename} (${branch}), thanks! 15 | # 16 | # If you track multiple remotes in the same repo, then you can add 17 | # the following values to [remote], to be loaded when you run 18 | # b4 ty -b foo/branchname: 19 | # [remote "foo"] 20 | # url = https://... 21 | # fetch = ... 22 | # b4-treename = uname/sound.git 23 | # b4-commit-url-mask = https://git.kernel.org/uname/sound/c/%.8s 24 | Applied to ${branch}, thanks! 25 | 26 | # for patch series, the summary is a list of each patch with a link 27 | # to the commit id in your tree, so you probably want to set 28 | # b4.thanks-commit-url-mask in gitconfig to a value like: 29 | # [b4] 30 | # thanks-commit-url-mask = https://git.kernel.org/username/c/%.12s 31 | # 32 | # Check this page for info on convenient URL shorteners: 33 | # https://korg.wiki.kernel.org/userdoc/git-url-shorterners 34 | ${summary} 35 | 36 | Best regards, 37 | -- 38 | # if ~/.signature exists, it will be put here, otherwise 39 | # the contents will be "user.name " from gitconfig 40 | ${signature} 41 | -------------------------------------------------------------------------------- /src/b4/templates/thanks-pr-template.example: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' will be removed 2 | # You can have two different templates for responding to 3 | # pull requests and for responding to patch series, though 4 | # in reality the difference will probably be one word: 5 | # "merged/pulled" vs. "applied". 6 | # Keeping it short and sweet is preferred. 7 | # 8 | On ${sentdate}, ${fromname} wrote: 9 | # quote will be limited to 5-6 lines, respecting paragraphs 10 | ${quote} 11 | 12 | # You can also use ${branch} and ${treename} if you set 13 | # b4.thanks-treename in your config, e.g.: 14 | #Merged into ${treename} (${branch}), thanks! 15 | # 16 | # If you track multiple remotes in the same repo, then you can add 17 | # the following values to [remote], to be loaded when you run 18 | # b4 ty -b foo/branchname: 19 | # [remote "foo"] 20 | # url = https://... 21 | # fetch = ... 22 | # b4-treename = uname/sound.git 23 | # b4-commit-url-mask = https://git.kernel.org/uname/sound/c/%.8s 24 | Merged into ${branch}, thanks! 25 | 26 | # for pull requests, the summary is a one-liner with the merge commit, 27 | # so you probably want to set b4.thanks-commit-url-mask in gitconfig 28 | # to a value like: 29 | # [b4] 30 | # thanks-commit-url-mask = https://git.kernel.org/username/c/%.12s 31 | # 32 | # Check this page for info on convenient URL shorteners: 33 | # https://korg.wiki.kernel.org/userdoc/git-url-shorterners 34 | ${summary} 35 | 36 | Best regards, 37 | -- 38 | # if ~/.signature exists, it will be put here, otherwise 39 | # the contents will be "user.name " from gitconfig 40 | ${signature} 41 | -------------------------------------------------------------------------------- /src/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mricon/b4/6f78e874e96b0b3bac1767a1743b20af20cb0e2f/src/tests/__init__.py -------------------------------------------------------------------------------- /src/tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest # noqa 2 | import b4 3 | import os 4 | import sys 5 | 6 | 7 | @pytest.fixture(scope="function", autouse=True) 8 | def settestdefaults(tmp_path): 9 | topdir = b4.git_get_toplevel() 10 | if topdir and topdir != os.getcwd(): 11 | os.chdir(topdir) 12 | b4.can_patatt = False 13 | b4.can_network = False 14 | b4.MAIN_CONFIG = dict(b4.DEFAULT_CONFIG) 15 | b4.USER_CONFIG = { 16 | 'name': 'Test Override', 17 | 'email': 'test-override@example.com', 18 | } 19 | os.environ['XDG_DATA_HOME'] = str(tmp_path) 20 | os.environ['XDG_CACHE_HOME'] = str(tmp_path) 21 | # This lets us avoid execvp-ing from inside b4 when testing 22 | sys._running_in_pytest = True 23 | 24 | 25 | @pytest.fixture(scope="function") 26 | def sampledir(request): 27 | return os.path.join(request.fspath.dirname, 'samples') 28 | 29 | 30 | @pytest.fixture(scope="function") 31 | def gitdir(request, tmp_path): 32 | sampledir = os.path.join(request.fspath.dirname, 'samples') 33 | # look for bundle file specific to the calling fspath 34 | bname = request.fspath.basename[5:-3] 35 | bfile = os.path.join(sampledir, f'{bname}-gitdir.bundle') 36 | if not os.path.exists(bfile): 37 | # Fall back to the default 38 | bfile = os.path.join(sampledir, 'gitdir.bundle') 39 | assert os.path.exists(bfile) 40 | dest = os.path.join(tmp_path, 'repo') 41 | args = ['clone', '--branch', 'master', bfile, dest] 42 | out, logstr = b4.git_run_command(None, args) 43 | assert out == 0 44 | b4.git_set_config(dest, 'user.name', b4.USER_CONFIG['name']) 45 | b4.git_set_config(dest, 'user.email', b4.USER_CONFIG['email']) 46 | olddir = os.getcwd() 47 | os.chdir(dest) 48 | yield dest 49 | os.chdir(olddir) 50 | -------------------------------------------------------------------------------- /src/tests/samples/gitdir.bundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mricon/b4/6f78e874e96b0b3bac1767a1743b20af20cb0e2f/src/tests/samples/gitdir.bundle -------------------------------------------------------------------------------- /src/tests/samples/gpg-badsig.txt: -------------------------------------------------------------------------------- 1 | [GNUPG:] NEWSIG 2 | [GNUPG:] KEYEXPIRED 1446574742 3 | [GNUPG:] KEYEXPIRED 1525881230 4 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 5 | [GNUPG:] KEYEXPIRED 1446574742 6 | [GNUPG:] KEYEXPIRED 1525881230 7 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 8 | [GNUPG:] BADSIG B6C41CE35664996C Konstantin Ryabitsev 9 | -------------------------------------------------------------------------------- /src/tests/samples/gpg-good-invalid-notrust.txt: -------------------------------------------------------------------------------- 1 | [GNUPG:] NEWSIG 2 | [GNUPG:] KEYEXPIRED 1446574742 3 | [GNUPG:] KEYEXPIRED 1525881230 4 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 5 | [GNUPG:] SIG_ID 5clUiMzlfE8KIyEu++mBk6I0Rnc 2021-06-09 1623274836 6 | [GNUPG:] KEYEXPIRED 1446574742 7 | [GNUPG:] KEYEXPIRED 1525881230 8 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 9 | [GNUPG:] GOODSIG B6C41CE35664996C Konstantin Ryabitsev 10 | [GNUPG:] KEYEXPIRED 1446574742 11 | [GNUPG:] KEYEXPIRED 1525881230 12 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 13 | [GNUPG:] KEYEXPIRED 1446574742 14 | [GNUPG:] KEYEXPIRED 1525881230 15 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 16 | [GNUPG:] KEYEXPIRED 1446574742 17 | [GNUPG:] KEYEXPIRED 1525881230 18 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 19 | [GNUPG:] TRUST_UNDEFINED 0 tofu 20 | -------------------------------------------------------------------------------- /src/tests/samples/gpg-good-valid-notrust.txt: -------------------------------------------------------------------------------- 1 | [GNUPG:] NEWSIG 2 | [GNUPG:] KEYEXPIRED 1446574742 3 | [GNUPG:] KEYEXPIRED 1525881230 4 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 5 | [GNUPG:] SIG_ID 5clUiMzlfE8KIyEu++mBk6I0Rnc 2021-06-09 1623274836 6 | [GNUPG:] KEYEXPIRED 1446574742 7 | [GNUPG:] KEYEXPIRED 1525881230 8 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 9 | [GNUPG:] GOODSIG B6C41CE35664996C Konstantin Ryabitsev 10 | [GNUPG:] VALIDSIG 76BE5DB25271E1481E678C35B6C41CE35664996C 2021-06-09 1623274836 0 4 0 22 8 01 DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 11 | [GNUPG:] KEYEXPIRED 1446574742 12 | [GNUPG:] KEYEXPIRED 1525881230 13 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 14 | [GNUPG:] KEYEXPIRED 1446574742 15 | [GNUPG:] KEYEXPIRED 1525881230 16 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 17 | [GNUPG:] KEYEXPIRED 1446574742 18 | [GNUPG:] KEYEXPIRED 1525881230 19 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 20 | [GNUPG:] TRUST_UNDEFINED 0 tofu 21 | -------------------------------------------------------------------------------- /src/tests/samples/gpg-good-valid-trusted.txt: -------------------------------------------------------------------------------- 1 | [GNUPG:] NEWSIG 2 | [GNUPG:] KEYEXPIRED 1446574742 3 | [GNUPG:] KEYEXPIRED 1525881230 4 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 5 | [GNUPG:] SIG_ID 5clUiMzlfE8KIyEu++mBk6I0Rnc 2021-06-09 1623274836 6 | [GNUPG:] KEYEXPIRED 1446574742 7 | [GNUPG:] KEYEXPIRED 1525881230 8 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 9 | [GNUPG:] GOODSIG B6C41CE35664996C Konstantin Ryabitsev 10 | [GNUPG:] VALIDSIG 76BE5DB25271E1481E678C35B6C41CE35664996C 2021-06-09 1623274836 0 4 0 22 8 01 DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 11 | [GNUPG:] KEYEXPIRED 1446574742 12 | [GNUPG:] KEYEXPIRED 1525881230 13 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 14 | [GNUPG:] KEYEXPIRED 1446574742 15 | [GNUPG:] KEYEXPIRED 1525881230 16 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 17 | [GNUPG:] KEYEXPIRED 1446574742 18 | [GNUPG:] KEYEXPIRED 1525881230 19 | [GNUPG:] KEY_CONSIDERED DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 0 20 | [GNUPG:] TRUST_ULTIMATE 0 tofu 21 | -------------------------------------------------------------------------------- /src/tests/samples/gpg-no-pubkey.txt: -------------------------------------------------------------------------------- 1 | [GNUPG:] NEWSIG 2 | [GNUPG:] ERRSIG B6C41CE35664996C 22 8 01 1623274836 9 76BE5DB25271E1481E678C35B6C41CE35664996C 3 | [GNUPG:] NO_PUBKEY B6C41CE35664996C 4 | -------------------------------------------------------------------------------- /src/tests/samples/save-7bit-clean.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: Test =?utf-8?q?S=C3=BBbject?= 3 | From: =?utf-8?b?VW5pY8O0ZMOpIE7DoG3DqA==?= 4 | <8-bit-header-unicodename@example.org> 5 | Date: Tue, 30 Aug 2022 11:19:07 -0400 6 | Message-Id: 7 | MIME-Version: 1.0 8 | Content-Type: text/plain; charset="utf-8" 9 | Content-Transfer-Encoding: 8bit 10 | 11 | This is à Méssagè with 8bit content éverywhère. 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/tests/samples/save-8bit-clean.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: Test Sûbject 3 | From: Unicôdé Nàmè <8-bit-header-unicodename@example.org> 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 8bit 9 | 10 | This is à Méssagè with 8bit content éverywhère. 11 | 12 | -------------------------------------------------------------------------------- /src/tests/samples/sevenbitify-1.verify: -------------------------------------------------------------------------------- 1 | From: Unicode =?utf-8?q?N=C3=A2me?= 2 | To: Ascii Name , 3 | =?utf-8?q?Unic=C3=B4de?= Firstname , 4 | Unicode =?utf-8?q?L=C3=A2stname?= 5 | Subject: Subject with =?utf-8?q?unic=C3=B4de_that_is_randomly_intersp=C3=A9r?= 6 | =?utf-8?q?sed_thr=C3=B4ughout?= the wrapped subject 7 | MIME-Version: 1.0 8 | Content-Type: text/plain; charset="utf-8" 9 | Content-Transfer-Encoding: 8bit 10 | 11 | Unicôde Côntent in the body. 12 | -------------------------------------------------------------------------------- /src/tests/samples/shazam-git1-just-series-defaults.verify: -------------------------------------------------------------------------------- 1 | konstantin@linuxfoundation.org 2 | test-override@example.com 3 | Minor typo changes imitation 4 | Life imitatus artem. 5 | 6 | Signed-off-by: Konstantin Ryabitsev 7 | --- 8 | konstantin@linuxfoundation.org 9 | test-override@example.com 10 | Add some paragraphs to lipsum 11 | Mostly junk. As expected. 12 | 13 | Signed-off-by: Konstantin Ryabitsev 14 | --- 15 | konstantin@linuxfoundation.org 16 | test-override@example.com 17 | Add more lines to file 1 18 | This is a second patch in the series. It needed a paragraph with the 19 | words of wisdom. 20 | 21 | Signed-off-by: Konstantin Ryabitsev 22 | --- 23 | konstantin@linuxfoundation.org 24 | test-override@example.com 25 | Remove line 2 from file2 26 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 27 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 28 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 29 | ac ante. Mauris sed faucibus orci. 30 | 31 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 32 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 33 | Nullam efficitur quis turpis quis sodales. 34 | 35 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 36 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 37 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 38 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 39 | tristique felis. Aenean quis tempus enim. 40 | 41 | Signed-off-by: Konstantin Ryabitsev 42 | --- 43 | -------------------------------------------------------------------------------- /src/tests/samples/shazam-git1-just-series-merged.verify: -------------------------------------------------------------------------------- 1 | test-override@example.com 2 | test-override@example.com 3 | Merge patch series "This is a cover for test series 1" 4 | Konstantin Ryabitsev says: 5 | 6 | Test patches for pytest. 7 | 8 | Link: https://lore.kernel.org/r/20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org 9 | Signed-off-by: Test Override 10 | --- 11 | konstantin@linuxfoundation.org 12 | test-override@example.com 13 | Minor typo changes imitation 14 | Life imitatus artem. 15 | 16 | Signed-off-by: Konstantin Ryabitsev 17 | --- 18 | konstantin@linuxfoundation.org 19 | test-override@example.com 20 | Add some paragraphs to lipsum 21 | Mostly junk. As expected. 22 | 23 | Signed-off-by: Konstantin Ryabitsev 24 | --- 25 | konstantin@linuxfoundation.org 26 | test-override@example.com 27 | Add more lines to file 1 28 | This is a second patch in the series. It needed a paragraph with the 29 | words of wisdom. 30 | 31 | Signed-off-by: Konstantin Ryabitsev 32 | --- 33 | konstantin@linuxfoundation.org 34 | test-override@example.com 35 | Remove line 2 from file2 36 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 37 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 38 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 39 | ac ante. Mauris sed faucibus orci. 40 | 41 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 42 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 43 | Nullam efficitur quis turpis quis sodales. 44 | 45 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 46 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 47 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 48 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 49 | tristique felis. Aenean quis tempus enim. 50 | 51 | Signed-off-by: Konstantin Ryabitsev 52 | --- 53 | -------------------------------------------------------------------------------- /src/tests/samples/shazam-git1-just-series.mbox: -------------------------------------------------------------------------------- 1 | From mboxrd@git Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH 0/4] This is a cover for test series 1 3 | MIME-Version: 1.0 4 | Content-Type: text/plain; charset="utf-8" 5 | Content-Transfer-Encoding: 8bit 6 | X-b4-tracking: H4sIACEfWGMC/w3KwQqAIAwA0F+RnRvMhRD9jdpIQQycdRH/PY8P3gCVlkXhNAOafFnzUxfsZiAmX2 7 | /BfC0DE7MldthFu0U5HFNkJvI7rBu8Cobma0xr17eUOX9DGAR1XAAAAA== 8 | From: Konstantin Ryabitsev 9 | Date: Tue, 25 Oct 2022 13:38:41 -0400 10 | Message-Id: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 11 | To: list@example.org 12 | Cc: Konstantin Ryabitsev 13 | X-Mailer: b4 0.11.0-dev-58177 14 | X-Developer-Signature: v=1; a=openpgp-sha256; l=584; 15 | i=konstantin@linuxfoundation.org; h=from:subject:message-id; 16 | bh=FEe26yiIiUIip3D/fCxDx+1tqTz2+Wr5V7gE21ONPQc=; 17 | b=owGbwMvMwCW27YjM47CUmTmMp9WSGJIj5BWvFTnFdtQ2fDNLtBbinLnr9pEV5ysuBP6c0b6wIt4w 18 | Ii2to5SFQYyLQVZMkaVsX+ymoMKHHnLpPaYwc1iZQIYwcHEKwESKjjH8z1j8xqZs6ryL8Y/nv9g8r7 19 | NKSuaa5J/FxVN+PdqrEnJZ4hwjw+Vp/84HtpnxX7uXp9Sw9ojKHE/OSV98X32+1f70199LV/kB 20 | X-Developer-Key: i=konstantin@linuxfoundation.org; a=openpgp; 21 | fpr=DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 22 | Status: O 23 | Content-Length: 562 24 | Lines: 22 25 | 26 | Test patches for pytest. 27 | 28 | Signed-off-by: Konstantin Ryabitsev 29 | 30 | --- 31 | Konstantin Ryabitsev (4): 32 | Remove line 2 from file2 33 | Add more lines to file 1 34 | Add some paragraphs to lipsum 35 | Minor typo changes imitation 36 | 37 | file1.txt | 12 ++++++++++++ 38 | file2.txt | 1 - 39 | lipsum.txt | 14 ++++++++++++-- 40 | 3 files changed, 24 insertions(+), 3 deletions(-) 41 | --- 42 | base-commit: f435c12df7c0ecf20ab8937859e63cddffacabb4 43 | change-id: 20221025-test1-e8520c2200a3 44 | 45 | Best regards, 46 | -- 47 | Konstantin Ryabitsev 48 | 49 | From mboxrd@git Thu Jan 1 00:00:00 1970 50 | From: Konstantin Ryabitsev 51 | Date: Tue, 25 Oct 2022 13:38:42 -0400 52 | Subject: [PATCH 1/4] Remove line 2 from file2 53 | MIME-Version: 1.0 54 | Content-Type: text/plain; charset="utf-8" 55 | Content-Transfer-Encoding: 8bit 56 | Message-Id: <20221025-test1-v1-1-e4f28f57990c@linuxfoundation.org> 57 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 58 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 59 | To: list@example.org 60 | Cc: Konstantin Ryabitsev 61 | X-Mailer: b4 0.11.0-dev-58177 62 | X-Developer-Signature: v=1; a=openpgp-sha256; l=1092; 63 | i=konstantin@linuxfoundation.org; h=from:subject:message-id; 64 | bh=zfPu6UbRvPUgMHVFSLLRI0lElRyBwE9n+14TovJnuYg=; 65 | b=owGbwMvMwCW27YjM47CUmTmMp9WSGJIj5BUrv6hFNy2SunEuNPtW8O0lHOx3rky/w/px8sWEFRPd 66 | Di861FHKwiDGxSArpshSti92U1DhQw+59B5TmDmsTCBDGLg4BWAilesZ/nA+cJat4H7O91R4fUjs/3 67 | NZCZ9Fptk0Cz/InHjr5J+4vPcM/72+5v7kXLcv7N4HjVuz8sQre788LX3O6ZLK+/XGm8/TTvEBAA== 68 | X-Developer-Key: i=konstantin@linuxfoundation.org; a=openpgp; 69 | fpr=DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 70 | Status: O 71 | Content-Length: 1062 72 | Lines: 30 73 | 74 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 75 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 76 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 77 | ac ante. Mauris sed faucibus orci. 78 | 79 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 80 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 81 | Nullam efficitur quis turpis quis sodales. 82 | 83 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 84 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 85 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 86 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 87 | tristique felis. Aenean quis tempus enim. 88 | 89 | Signed-off-by: Konstantin Ryabitsev 90 | --- 91 | file2.txt | 1 - 92 | 1 file changed, 1 deletion(-) 93 | 94 | diff --git a/file2.txt b/file2.txt 95 | index d5a0124..3eac351 100644 96 | --- a/file2.txt 97 | +++ b/file2.txt 98 | @@ -1,2 +1 @@ 99 | This is file 2. 100 | -This is a new line in file 2. 101 | 102 | -- 103 | b4 0.11.0-dev-58177 104 | 105 | From mboxrd@git Thu Jan 1 00:00:00 1970 106 | From: Konstantin Ryabitsev 107 | Date: Tue, 25 Oct 2022 13:38:43 -0400 108 | Subject: [PATCH 2/4] Add more lines to file 1 109 | MIME-Version: 1.0 110 | Content-Type: text/plain; charset="utf-8" 111 | Content-Transfer-Encoding: 8bit 112 | Message-Id: <20221025-test1-v1-2-e4f28f57990c@linuxfoundation.org> 113 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 114 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 115 | To: list@example.org 116 | Cc: Konstantin Ryabitsev 117 | X-Mailer: b4 0.11.0-dev-58177 118 | X-Developer-Signature: v=1; a=openpgp-sha256; l=1108; 119 | i=konstantin@linuxfoundation.org; h=from:subject:message-id; 120 | bh=Q88W/T/bAIWZ7OMIFSAFDoA0YpRrh5uPCp8Nl9ccs0Q=; 121 | b=owGbwMvMwCW27YjM47CUmTmMp9WSGJIj5BUbNQ9+eSd9Vm7PLMMmnhu2N98dnGNtf8IuZnbo44cv 122 | Tj6K6ShlYRDjYpAVU2Qp2xe7KajwoYdceo8pzBxWJpAhDFycAjARzzxGhk15ofHHPG8LV4UG/VEU+y 123 | Y9eZ7K0Zf/DYPqa7Y/M5gxeQcjw1lB1wUTKx9Lb69Y8t1xK1PvzfrPP/IW+f51yd89W1diHz8A 124 | X-Developer-Key: i=konstantin@linuxfoundation.org; a=openpgp; 125 | fpr=DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 126 | Status: O 127 | Content-Length: 1077 128 | Lines: 31 129 | 130 | This is a second patch in the series. It needed a paragraph with the 131 | words of wisdom. 132 | 133 | Signed-off-by: Konstantin Ryabitsev 134 | --- 135 | file1.txt | 12 ++++++++++++ 136 | 1 file changed, 12 insertions(+) 137 | 138 | diff --git a/file1.txt b/file1.txt 139 | index b352682..936a0c8 100644 140 | --- a/file1.txt 141 | +++ b/file1.txt 142 | @@ -1,3 +1,15 @@ 143 | This is file 1. 144 | It has a single line. 145 | This is a second line I added. 146 | +This is a third line that belongs here. 147 | + 148 | +As well as the following words of wisdom: 149 | + 150 | +Duis rutrum eu urna eu viverra. Curabitur vehicula ut nisl id accumsan. 151 | +Praesent condimentum mattis rutrum. Maecenas tincidunt ipsum nec hendrerit 152 | +pulvinar. Suspendisse sed commodo nisl, vitae tincidunt libero. Donec lacus 153 | +ante, maximus eu nulla in, lacinia aliquam sem. Fusce efficitur nisl elit, et 154 | +sodales nisi pellentesque in. Nulla eros sem, sagittis sit amet nisi non, 155 | +venenatis accumsan augue. Sed ipsum ligula, sodales nec pharetra eget, congue 156 | +id mi. Duis et accumsan lacus, in sollicitudin metus. In eu velit ut tortor 157 | +finibus sodales. 158 | 159 | -- 160 | b4 0.11.0-dev-58177 161 | 162 | From mboxrd@git Thu Jan 1 00:00:00 1970 163 | From: Konstantin Ryabitsev 164 | Date: Tue, 25 Oct 2022 13:38:44 -0400 165 | Subject: [PATCH 3/4] Add some paragraphs to lipsum 166 | MIME-Version: 1.0 167 | Content-Type: text/plain; charset="utf-8" 168 | Content-Transfer-Encoding: 8bit 169 | Message-Id: <20221025-test1-v1-3-e4f28f57990c@linuxfoundation.org> 170 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 171 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 172 | To: list@example.org 173 | Cc: Konstantin Ryabitsev 174 | X-Mailer: b4 0.11.0-dev-58177 175 | X-Developer-Signature: v=1; a=openpgp-sha256; l=1828; 176 | i=konstantin@linuxfoundation.org; h=from:subject:message-id; 177 | bh=J5kDTc3PYEDcsLO5Vf2zTCEk4ebVong3oEoRm681pBs=; 178 | b=owGbwMvMwCW27YjM47CUmTmMp9WSGJIj5BV33f317vx7y7zj18pYfp/4/Xjmxknv8+82/jYTumsv 179 | b3A2t6OUhUGMi0FWTJGlbF/spqDChx5y6T2mMHNYmUCGMHBxCsBErt1k+KcovejsJqaMax77TpTOeL 180 | 3UTePTAn/m22V67OE8zWppbcsYGc4FX1x0/Jss37QHtq7ilVv6X9qq7f2S+eiA560rMubrjzEAAA== 181 | X-Developer-Key: i=konstantin@linuxfoundation.org; a=openpgp; 182 | fpr=DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 183 | Status: O 184 | Content-Length: 1792 185 | Lines: 36 186 | 187 | Mostly junk. As expected. 188 | 189 | Signed-off-by: Konstantin Ryabitsev 190 | --- 191 | lipsum.txt | 14 ++++++++++++-- 192 | 1 file changed, 12 insertions(+), 2 deletions(-) 193 | 194 | diff --git a/lipsum.txt b/lipsum.txt 195 | index d8f8dc5..750dabb 100644 196 | --- a/lipsum.txt 197 | +++ b/lipsum.txt 198 | @@ -4,9 +4,19 @@ est. Proin vestibulum enim et sagittis eleifend. Maecenas mattis, felis ac 199 | aliquet gravida, risus erat tempor sapien, tempor ultricies urna magna non 200 | urna. Nam luctus lorem a enim pulvinar, eget viverra dui viverra. Praesent ut 201 | libero a lectus posuere tempus. Interdum et malesuada fames ac ante ipsum 202 | -primis in faucibus. Phasellus cursus lectus sed metus interdum aliquet. Ut non 203 | +primis in faucibus. Phasellius cursus lectus sed metus interdum aliquet. Ut non 204 | erat consectetur, pretium quam at, maximus nisl. Donec tempus facilisis ex sit 205 | amet condimentum. Suspendisse vitae diam sem. Donec ligula tellus, scelerisque 206 | -efficitur mauris non, euismod auctor urna. Morbi ac hendrerit erat. Phasellus 207 | +efficitur mauris non, euismodae auctor urna. Morbi ac hendrerit erat. Phasellus 208 | at mauris id dui malesuada porta ut et justo. Integer convallis quis ligula 209 | vitae sollicitudin. Nulla sit amet tincidunt nulla, eget vestibulum massa. 210 | + 211 | +Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur nec dui 212 | +ut lacus vehicula aliquet. Curabitur ac tincidunt risus. Etiam in eros massa. 213 | +Curabitur scelerisque orci non justo sollicitudin bibendum. Sed quis risus 214 | +imperdiet, tincidunt quam eget, consectetur eros. Maecenas sollicitudin augue 215 | +quis odio fermentum, eget elementum ipsum maximus. Etiam quam odio, tempus nec 216 | +posuere at, facilisis nec turpis. 217 | + 218 | +Curabitur porttitor sit amet odio ac rutrum. 219 | +Integer bibendum metus eu bibendum porttitor. 220 | 221 | -- 222 | b4 0.11.0-dev-58177 223 | 224 | From mboxrd@git Thu Jan 1 00:00:00 1970 225 | From: Konstantin Ryabitsev 226 | Date: Tue, 25 Oct 2022 13:38:45 -0400 227 | Subject: [PATCH 4/4] Minor typo changes imitation 228 | MIME-Version: 1.0 229 | Content-Type: text/plain; charset="utf-8" 230 | Content-Transfer-Encoding: 8bit 231 | Message-Id: <20221025-test1-v1-4-e4f28f57990c@linuxfoundation.org> 232 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 233 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 234 | To: list@example.org 235 | Cc: Konstantin Ryabitsev 236 | X-Mailer: b4 0.11.0-dev-58177 237 | X-Developer-Signature: v=1; a=openpgp-sha256; l=1064; 238 | i=konstantin@linuxfoundation.org; h=from:subject:message-id; 239 | bh=EQePByhrPcGZfFXT+l7nTJOs3RuWSKCRQfZ0rr2d05U=; 240 | b=owGbwMvMwCW27YjM47CUmTmMp9WSGJIj5BW3JG1kWJRodLvAeLpPlUnz4Y/KQsu7Xr2rD52891F+ 241 | 1U6rjlIWBjEuBlkxRZayfbGbggofesil95jCzGFlAhnCwMUpABPhLGFkmCfQPKmSNfF/3IGoeT9W1S 242 | /J+R4s53NX8nn+/LYMk8yaqYwML27xvzBWKfxmL1T+IS1UmS/m8+/Tjm8mLok7cLvO79IGRgA= 243 | X-Developer-Key: i=konstantin@linuxfoundation.org; a=openpgp; 244 | fpr=DE0E66E32F1FDD0902666B96E63EDCA9329DD07E 245 | Status: O 246 | Content-Length: 1037 247 | Lines: 27 248 | 249 | Life imitatus artem. 250 | 251 | Signed-off-by: Konstantin Ryabitsev 252 | --- 253 | lipsum.txt | 4 ++-- 254 | 1 file changed, 2 insertions(+), 2 deletions(-) 255 | 256 | diff --git a/lipsum.txt b/lipsum.txt 257 | index 750dabb..d304f7f 100644 258 | --- a/lipsum.txt 259 | +++ b/lipsum.txt 260 | @@ -13,10 +13,10 @@ vitae sollicitudin. Nulla sit amet tincidunt nulla, eget vestibulum massa. 261 | 262 | Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur nec dui 263 | ut lacus vehicula aliquet. Curabitur ac tincidunt risus. Etiam in eros massa. 264 | -Curabitur scelerisque orci non justo sollicitudin bibendum. Sed quis risus 265 | +Curabitur scelerisque orci non justo sollicitudin vivendum. Sed quis risus 266 | imperdiet, tincidunt quam eget, consectetur eros. Maecenas sollicitudin augue 267 | quis odio fermentum, eget elementum ipsum maximus. Etiam quam odio, tempus nec 268 | posuere at, facilisis nec turpis. 269 | 270 | Curabitur porttitor sit amet odio ac rutrum. 271 | -Integer bibendum metus eu bibendum porttitor. 272 | +Floatus bibendum metus eu bibendum porttitor. 273 | 274 | -- 275 | b4 0.11.0-dev-58177 276 | 277 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-bare-address-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Cc: bare-address@example.org 14 | Reviewed-by: Original Reviewer 15 | Link: https://msgid.link/some@msgid.here 16 | Signed-off-by: Original Submitter 17 | Reviewed-by: "Followup Reviewer1 (corporate)" 18 | Tested-by: Followup Reviewer2 19 | 20 | diff --git a/b4/junk.py b/b4/junk.py 21 | index 12345678..23456789 100644 22 | --- a/b4/junk.py 23 | +++ b/b4/junk.py 24 | @@@ -1,1 +1,1 @@ def junk(): 25 | 26 | 27 | -junk1 28 | +junk2 29 | 30 | 31 | -- 32 | 2.wong.fu 33 | 34 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-bare-address.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Cc: bare-address@example.org 14 | Reviewed-by: Original Reviewer 15 | Link: https://msgid.link/some@msgid.here 16 | Signed-off-by: Original Submitter 17 | --- 18 | 19 | diff --git a/b4/junk.py b/b4/junk.py 20 | index 12345678..23456789 100644 21 | --- a/b4/junk.py 22 | +++ b/b4/junk.py 23 | @@@ -1,1 +1,1 @@ def junk(): 24 | 25 | 26 | -junk1 27 | +junk2 28 | 29 | 30 | -- 31 | 2.wong.fu 32 | 33 | From foo@z Thu Jan 1 00:00:00 1970 34 | From: Followup Reviewer1 35 | Subject: Re: [PATCH] Simple test 36 | Date: Tue, 30 Aug 2022 11:19:07 -0400 37 | Message-Id: 38 | In-Reply-To: 39 | References: 40 | 41 | > This is a simple trailer parsing test. 42 | 43 | Reviewed-by: Followup Reviewer1 (corporate) 44 | 45 | -- 46 | My sig 47 | 48 | From foo@z Thu Jan 1 00:00:00 1970 49 | From: Followup Reviewer2 50 | Subject: Re: [PATCH] Simple test 51 | Date: Tue, 30 Aug 2022 11:19:07 -0400 52 | Message-Id: 53 | In-Reply-To: 54 | References: 55 | 56 | >> This is a simple trailer parsing test. 57 | > 58 | > Reviewed-by: Followup Reviewer1 59 | 60 | Tested-by: Followup Reviewer2 61 | 62 | -- 63 | My sig 64 | 65 | From foo@z Thu Jan 1 00:00:00 1970 66 | From: Mismatched Reviewer 67 | Subject: Re: [PATCH] Simple test 68 | Date: Tue, 30 Aug 2022 11:19:07 -0400 69 | Message-Id: 70 | In-Reply-To: 71 | References: 72 | 73 | > This is a simple trailer parsing test. 74 | 75 | Reviewed-by: Mismatched Reviewer1 76 | 77 | -- 78 | My sig 79 | 80 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-custody-ref-ordered.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Link: https://msgid.link/some@msgid.here 13 | Reviewed-by: Original Reviewer 14 | Signed-off-by: Original Submitter 15 | Cc: Dev Eloper1 16 | Cc: Dev Eloper2 17 | Cc: Some List 18 | Fixes: abcdef01234567890 19 | Link: https://lore.kernel.org/some@msgid.here # bug discussion 20 | Suggested-by: Friendly Suggester 21 | Reviewed-by: Followup Reviewer1 22 | Tested-by: Followup Reviewer2 23 | Signed-off-by: Test Override 24 | 25 | diff --git a/b4/junk.py b/b4/junk.py 26 | index 12345678..23456789 100644 27 | --- a/b4/junk.py 28 | +++ b/b4/junk.py 29 | @@@ -1,1 +1,1 @@ def junk(): 30 | 31 | 32 | -junk1 33 | +junk2 34 | 35 | 36 | -- 37 | 2.wong.fu 38 | 39 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-custody-ref-unordered.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Link: https://msgid.link/some@msgid.here 13 | Reviewed-by: Original Reviewer 14 | Signed-off-by: Original Submitter 15 | Suggested-by: Friendly Suggester 16 | Fixes: abcdef01234567890 17 | Link: https://lore.kernel.org/some@msgid.here # bug discussion 18 | Reviewed-by: Followup Reviewer1 19 | Tested-by: Followup Reviewer2 20 | Cc: Dev Eloper1 21 | Cc: Dev Eloper2 22 | Cc: Some List 23 | Signed-off-by: Test Override 24 | 25 | diff --git a/b4/junk.py b/b4/junk.py 26 | index 12345678..23456789 100644 27 | --- a/b4/junk.py 28 | +++ b/b4/junk.py 29 | @@@ -1,1 +1,1 @@ def junk(): 30 | 31 | 32 | -junk1 33 | +junk2 34 | 35 | 36 | -- 37 | 2.wong.fu 38 | 39 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-custody-ref-with-ignored.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Link: https://msgid.link/some@msgid.here 13 | Reviewed-by: Original Reviewer 14 | Signed-off-by: Original Submitter 15 | Suggested-by: Friendly Suggester 16 | Fixes: abcdef01234567890 17 | Link: https://lore.kernel.org/some@msgid.here # bug discussion 18 | Tested-by: Followup Reviewer2 19 | Cc: Dev Eloper1 20 | Cc: Dev Eloper2 21 | Cc: Some List 22 | Signed-off-by: Test Override 23 | 24 | diff --git a/b4/junk.py b/b4/junk.py 25 | index 12345678..23456789 100644 26 | --- a/b4/junk.py 27 | +++ b/b4/junk.py 28 | @@@ -1,1 +1,1 @@ def junk(): 29 | 30 | 31 | -junk1 32 | +junk2 33 | 34 | 35 | -- 36 | 2.wong.fu 37 | 38 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-custody.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Link: https://msgid.link/some@msgid.here 13 | Reviewed-by: Original Reviewer 14 | Signed-off-by: Original Submitter 15 | Suggested-by: Friendly Suggester 16 | Fixes: abcdef01234567890 17 | Link: https://lore.kernel.org/some@msgid.here # bug discussion 18 | Signed-off-by: Test Override 19 | --- 20 | 21 | diff --git a/b4/junk.py b/b4/junk.py 22 | index 12345678..23456789 100644 23 | --- a/b4/junk.py 24 | +++ b/b4/junk.py 25 | @@@ -1,1 +1,1 @@ def junk(): 26 | 27 | 28 | -junk1 29 | +junk2 30 | 31 | 32 | -- 33 | 2.wong.fu 34 | 35 | From foo@z Thu Jan 1 00:00:00 1970 36 | From: Followup Reviewer1 37 | Subject: Re: [PATCH] Simple test 38 | Date: Tue, 30 Aug 2022 11:19:07 -0400 39 | Message-Id: 40 | In-Reply-To: 41 | References: 42 | 43 | > This is a simple trailer parsing test. 44 | 45 | Reviewed-by: Followup Reviewer1 46 | 47 | -- 48 | My sig 49 | 50 | From foo@z Thu Jan 1 00:00:00 1970 51 | From: Followup Reviewer2 52 | Subject: Re: [PATCH] Simple test 53 | Date: Tue, 30 Aug 2022 11:19:07 -0400 54 | Message-Id: 55 | In-Reply-To: 56 | References: 57 | 58 | >> This is a simple trailer parsing test. 59 | > 60 | > Reviewed-by: Followup Reviewer1 61 | 62 | Tested-by: Followup Reviewer2 63 | 64 | -- 65 | My sig 66 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-name-parens-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: "Followup Reviewer1 (corporate)" 17 | Tested-by: Followup Reviewer2 18 | 19 | diff --git a/b4/junk.py b/b4/junk.py 20 | index 12345678..23456789 100644 21 | --- a/b4/junk.py 22 | +++ b/b4/junk.py 23 | @@@ -1,1 +1,1 @@ def junk(): 24 | 25 | 26 | -junk1 27 | +junk2 28 | 29 | 30 | -- 31 | 2.wong.fu 32 | 33 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-name-parens.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | --- 17 | 18 | diff --git a/b4/junk.py b/b4/junk.py 19 | index 12345678..23456789 100644 20 | --- a/b4/junk.py 21 | +++ b/b4/junk.py 22 | @@@ -1,1 +1,1 @@ def junk(): 23 | 24 | 25 | -junk1 26 | +junk2 27 | 28 | 29 | -- 30 | 2.wong.fu 31 | 32 | From foo@z Thu Jan 1 00:00:00 1970 33 | From: Followup Reviewer1 34 | Subject: Re: [PATCH] Simple test 35 | Date: Tue, 30 Aug 2022 11:19:07 -0400 36 | Message-Id: 37 | In-Reply-To: 38 | References: 39 | 40 | > This is a simple trailer parsing test. 41 | 42 | Reviewed-by: Followup Reviewer1 (corporate) 43 | 44 | -- 45 | My sig 46 | 47 | From foo@z Thu Jan 1 00:00:00 1970 48 | From: Followup Reviewer2 49 | Subject: Re: [PATCH] Simple test 50 | Date: Tue, 30 Aug 2022 11:19:07 -0400 51 | Message-Id: 52 | In-Reply-To: 53 | References: 54 | 55 | >> This is a simple trailer parsing test. 56 | > 57 | > Reviewed-by: Followup Reviewer1 58 | 59 | Tested-by: Followup Reviewer2 60 | 61 | -- 62 | My sig 63 | 64 | From foo@z Thu Jan 1 00:00:00 1970 65 | From: Mismatched Reviewer 66 | Subject: Re: [PATCH] Simple test 67 | Date: Tue, 30 Aug 2022 11:19:07 -0400 68 | Message-Id: 69 | In-Reply-To: 70 | References: 71 | 72 | > This is a simple trailer parsing test. 73 | 74 | Reviewed-by: Mismatched Reviewer1 75 | 76 | -- 77 | My sig 78 | 79 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-non-git-patch-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | 18 | --- a/b4/junk.py 19 | +++ b/b4/junk.py 20 | @@@ -1,1 +1,1 @@ def junk(): 21 | 22 | 23 | -junk1 24 | +junk2 25 | 26 | 27 | -- 28 | 2.wong.fu 29 | 30 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-non-git-patch-with-comments-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | --- 18 | This contains comments that are included below the message, but there is 19 | no diffstat. 20 | 21 | --- a/b4/junk.py 22 | +++ b/b4/junk.py 23 | @@@ -1,1 +1,1 @@ def junk(): 24 | 25 | 26 | -junk1 27 | +junk2 28 | 29 | 30 | -- 31 | 2.wong.fu 32 | 33 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-non-git-patch-with-comments.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | --- 17 | This contains comments that are included below the message, but there is 18 | no diffstat. 19 | 20 | --- a/b4/junk.py 21 | +++ b/b4/junk.py 22 | @@@ -1,1 +1,1 @@ def junk(): 23 | 24 | 25 | -junk1 26 | +junk2 27 | 28 | 29 | -- 30 | 2.wong.fu 31 | 32 | From foo@z Thu Jan 1 00:00:00 1970 33 | From: Followup Reviewer1 34 | Subject: Re: [PATCH] Simple test 35 | Date: Tue, 30 Aug 2022 11:19:07 -0400 36 | Message-Id: 37 | In-Reply-To: 38 | References: 39 | 40 | > This is a simple trailer parsing test. 41 | 42 | Reviewed-by: Followup Reviewer1 43 | 44 | -- 45 | My sig 46 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-non-git-patch.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | 17 | --- a/b4/junk.py 18 | +++ b/b4/junk.py 19 | @@@ -1,1 +1,1 @@ def junk(): 20 | 21 | 22 | -junk1 23 | +junk2 24 | 25 | 26 | -- 27 | 2.wong.fu 28 | 29 | From foo@z Thu Jan 1 00:00:00 1970 30 | From: Followup Reviewer1 31 | Subject: Re: [PATCH] Simple test 32 | Date: Tue, 30 Aug 2022 11:19:07 -0400 33 | Message-Id: 34 | In-Reply-To: 35 | References: 36 | 37 | > This is a simple trailer parsing test. 38 | 39 | Reviewed-by: Followup Reviewer1 40 | 41 | -- 42 | My sig 43 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-nore-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | 18 | diff --git a/b4/junk.py b/b4/junk.py 19 | index 12345678..23456789 100644 20 | --- a/b4/junk.py 21 | +++ b/b4/junk.py 22 | @@@ -1,1 +1,1 @@ def junk(): 23 | 24 | 25 | -junk1 26 | +junk2 27 | 28 | 29 | -- 30 | 2.wong.fu 31 | 32 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-nore.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | --- 17 | 18 | diff --git a/b4/junk.py b/b4/junk.py 19 | index 12345678..23456789 100644 20 | --- a/b4/junk.py 21 | +++ b/b4/junk.py 22 | @@@ -1,1 +1,1 @@ def junk(): 23 | 24 | 25 | -junk1 26 | +junk2 27 | 28 | 29 | -- 30 | 2.wong.fu 31 | 32 | From foo@z Thu Jan 1 00:00:00 1970 33 | From: Followup Reviewer1 34 | Subject: [PATCH] Simple test 35 | Date: Tue, 30 Aug 2022 11:19:07 -0400 36 | Message-Id: 37 | In-Reply-To: 38 | References: 39 | 40 | > This is a simple trailer parsing test. 41 | 42 | Reviewed-by: Followup Reviewer1 43 | 44 | -- 45 | My sig 46 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-partial-reroll-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH v3 1/2] Simple test 1 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test patch 1. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Coverletter Reviewer1 17 | Signed-off-by: Test Override 18 | 19 | diff --git a/b4/junk.py b/b4/junk.py 20 | index 12345678..23456789 100644 21 | --- a/b4/junk.py 22 | +++ b/b4/junk.py 23 | @@@ -1,1 +1,1 @@ def junk(): 24 | 25 | 26 | -junk1 27 | +junk2 28 | 29 | 30 | -- 31 | 2.wong.fu 32 | 33 | From git@z Thu Jan 1 00:00:00 1970 34 | Subject: [PATCH v3 2/2] Simple test 2 35 | From: Test Test 36 | Date: Tue, 30 Aug 2022 11:19:07 -0400 37 | Message-Id: 38 | MIME-Version: 1.0 39 | Content-Type: text/plain; charset="utf-8" 40 | Content-Transfer-Encoding: 7bit 41 | 42 | Follow-up trailer collating test patch 2. 43 | Partial reroll test. 44 | 45 | Fixes: abcdef01234567890 46 | Reviewed-by: Original Reviewer 47 | Link: https://msgid.link/some@msgid.here 48 | Signed-off-by: Original Submitter 49 | Reviewed-by: Coverletter Reviewer1 50 | Signed-off-by: Test Override 51 | 52 | diff --git a/b4/bogus.py b/b4/bogus.py 53 | index 12345678..23456789 100644 54 | --- a/b4/bogus.py 55 | +++ b/b4/bogus.py 56 | @@@ -1,1 +1,1 @@ def bogus(): 57 | 58 | 59 | -bogus1 60 | +bogus2 61 | 62 | 63 | -- 64 | 2.wong.fu 65 | 66 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-partial-reroll.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH v2 0/2] Simple cover 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | This is a cover letter. It has a diffstat. 11 | 12 | --- 13 | b4/junk.py | 1 - 14 | b4/bupkes.py | 1 - 15 | 2 files changed, 2 insertions(+), 2 deletions(-) 16 | 17 | 18 | From foo@z Thu Jan 1 00:00:00 1970 19 | From: Test Test 20 | Subject: [PATCH v2 1/2] Simple test 1 21 | To: Some List 22 | Cc: Dev Eloper1 , 23 | Dev Eloper2 24 | Date: Tue, 30 Aug 2022 11:19:07 -0400 25 | Message-Id: 26 | In-Reply-To: 27 | References: 28 | 29 | Follow-up trailer collating test patch 1. 30 | 31 | Fixes: abcdef01234567890 32 | Reviewed-by: Original Reviewer 33 | Link: https://msgid.link/some@msgid.here 34 | Signed-off-by: Original Submitter 35 | --- 36 | 37 | diff --git a/b4/junk.py b/b4/junk.py 38 | index 12345678..23456789 100644 39 | --- a/b4/junk.py 40 | +++ b/b4/junk.py 41 | @@@ -1,1 +1,1 @@ def junk(): 42 | 43 | 44 | -junk1 45 | +junk2 46 | 47 | 48 | -- 49 | 2.wong.fu 50 | 51 | From foo@z Thu Jan 1 00:00:00 1970 52 | From: Test Test 53 | Subject: [PATCH v2 2/2] Simple test 2 54 | To: Some List 55 | Cc: Dev Eloper1 , 56 | Dev Eloper2 57 | Date: Tue, 30 Aug 2022 11:19:07 -0400 58 | Message-Id: 59 | In-Reply-To: 60 | References: 61 | 62 | Follow-up trailer collating test patch 2. 63 | 64 | Fixes: abcdef01234567890 65 | Reviewed-by: Original Reviewer 66 | Link: https://msgid.link/some@msgid.here 67 | Signed-off-by: Original Submitter 68 | --- 69 | 70 | diff --git a/b4/bupkes.py b/b4/bupkes.py 71 | index 12345678..23456789 100644 72 | --- a/b4/bupkes.py 73 | +++ b/b4/bupkes.py 74 | @@@ -1,1 +1,1 @@ def bupkes(): 75 | 76 | 77 | -bupkes1 78 | +bupkes2 79 | 80 | 81 | -- 82 | 2.wong.fu 83 | 84 | From foo@z Thu Jan 1 00:00:00 1970 85 | From: Followup Reviewer1 86 | Subject: Re: [PATCH v2 2/2] Simple test 2 87 | Date: Tue, 30 Aug 2022 11:19:07 -0400 88 | Message-Id: 89 | In-Reply-To: 90 | References: 91 | 92 | > This is a simple trailer parsing test. 93 | 94 | Reviewed-by: Followup Reviewer1 95 | 96 | -- 97 | My sig 98 | 99 | From foo@z Thu Jan 1 00:00:00 1970 100 | From: Followup Reviewer1 101 | Subject: Re: [PATCH v2 0/2] Simple cover 102 | Date: Tue, 30 Aug 2022 11:19:07 -0400 103 | Message-Id: 104 | In-Reply-To: 105 | References: 106 | 107 | > This is a simple trailer parsing test. 108 | 109 | Reviewed-by: Coverletter Reviewer1 110 | 111 | -- 112 | My sig 113 | 114 | From foo@z Thu Jan 1 00:00:00 1970 115 | From: Test Test 116 | Subject: [PATCH v3 2/2] Simple test 2 117 | To: Some List 118 | Cc: Dev Eloper1 , 119 | Dev Eloper2 120 | Date: Tue, 30 Aug 2022 11:19:07 -0400 121 | Message-Id: 122 | In-Reply-To: 123 | References: 124 | 125 | Follow-up trailer collating test patch 2. 126 | Partial reroll test. 127 | 128 | Fixes: abcdef01234567890 129 | Reviewed-by: Original Reviewer 130 | Link: https://msgid.link/some@msgid.here 131 | Signed-off-by: Original Submitter 132 | --- 133 | 134 | diff --git a/b4/bogus.py b/b4/bogus.py 135 | index 12345678..23456789 100644 136 | --- a/b4/bogus.py 137 | +++ b/b4/bogus.py 138 | @@@ -1,1 +1,1 @@ def bogus(): 139 | 140 | 141 | -bogus1 142 | +bogus2 143 | 144 | 145 | -- 146 | 2.wong.fu 147 | 148 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-addlink.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | Tested-by: Followup Reviewer2 18 | Link: https://lore.kernel.org/r/orig-message@example.com 19 | Signed-off-by: Test Override 20 | 21 | diff --git a/b4/junk.py b/b4/junk.py 22 | index 12345678..23456789 100644 23 | --- a/b4/junk.py 24 | +++ b/b4/junk.py 25 | @@@ -1,1 +1,1 @@ def junk(): 26 | 27 | 28 | -junk1 29 | +junk2 30 | 31 | 32 | -- 33 | 2.wong.fu 34 | 35 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-addmsgid.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | Tested-by: Followup Reviewer2 18 | Message-ID: 19 | Signed-off-by: Test Override 20 | 21 | diff --git a/b4/junk.py b/b4/junk.py 22 | index 12345678..23456789 100644 23 | --- a/b4/junk.py 24 | +++ b/b4/junk.py 25 | @@@ -1,1 +1,1 @@ def junk(): 26 | 27 | 28 | -junk1 29 | +junk2 30 | 31 | 32 | -- 33 | 2.wong.fu 34 | 35 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-addmysob.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | Tested-by: Followup Reviewer2 18 | Signed-off-by: Test Override 19 | 20 | diff --git a/b4/junk.py b/b4/junk.py 21 | index 12345678..23456789 100644 22 | --- a/b4/junk.py 23 | +++ b/b4/junk.py 24 | @@@ -1,1 +1,1 @@ def junk(): 25 | 26 | 27 | -junk1 28 | +junk2 29 | 30 | 31 | -- 32 | 2.wong.fu 33 | 34 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-copyccs.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | Tested-by: Followup Reviewer2 18 | Cc: Dev Eloper1 19 | Cc: Dev Eloper2 20 | Cc: Some List 21 | Signed-off-by: Test Override 22 | 23 | diff --git a/b4/junk.py b/b4/junk.py 24 | index 12345678..23456789 100644 25 | --- a/b4/junk.py 26 | +++ b/b4/junk.py 27 | @@@ -1,1 +1,1 @@ def junk(): 28 | 29 | 30 | -junk1 31 | +junk2 32 | 33 | 34 | -- 35 | 2.wong.fu 36 | 37 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | Tested-by: Followup Reviewer2 18 | 19 | diff --git a/b4/junk.py b/b4/junk.py 20 | index 12345678..23456789 100644 21 | --- a/b4/junk.py 22 | +++ b/b4/junk.py 23 | @@@ -1,1 +1,1 @@ def junk(): 24 | 25 | 26 | -junk1 27 | +junk2 28 | 29 | 30 | -- 31 | 2.wong.fu 32 | 33 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-noadd.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | --- 17 | 18 | diff --git a/b4/junk.py b/b4/junk.py 19 | index 12345678..23456789 100644 20 | --- a/b4/junk.py 21 | +++ b/b4/junk.py 22 | @@@ -1,1 +1,1 @@ def junk(): 23 | 24 | 25 | -junk1 26 | +junk2 27 | 28 | 29 | -- 30 | 2.wong.fu 31 | 32 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-ordered.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Cc: Dev Eloper1 17 | Cc: Dev Eloper2 18 | Cc: Some List 19 | Tested-by: Followup Reviewer2 20 | Reviewed-by: Followup Reviewer1 21 | Signed-off-by: Test Override 22 | 23 | diff --git a/b4/junk.py b/b4/junk.py 24 | index 12345678..23456789 100644 25 | --- a/b4/junk.py 26 | +++ b/b4/junk.py 27 | @@@ -1,1 +1,1 @@ def junk(): 28 | 29 | 30 | -junk1 31 | +junk2 32 | 33 | 34 | -- 35 | 2.wong.fu 36 | 37 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single-ref-sloppy.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | Tested-by: Followup Reviewer2 18 | Reviewed-by: Mismatched Reviewer1 19 | Signed-off-by: Test Override 20 | 21 | diff --git a/b4/junk.py b/b4/junk.py 22 | index 12345678..23456789 100644 23 | --- a/b4/junk.py 24 | +++ b/b4/junk.py 25 | @@@ -1,1 +1,1 @@ def junk(): 26 | 27 | 28 | -junk1 29 | +junk2 30 | 31 | 32 | -- 33 | 2.wong.fu 34 | 35 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-single.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | --- 17 | 18 | diff --git a/b4/junk.py b/b4/junk.py 19 | index 12345678..23456789 100644 20 | --- a/b4/junk.py 21 | +++ b/b4/junk.py 22 | @@@ -1,1 +1,1 @@ def junk(): 23 | 24 | 25 | -junk1 26 | +junk2 27 | 28 | 29 | -- 30 | 2.wong.fu 31 | 32 | From foo@z Thu Jan 1 00:00:00 1970 33 | From: Followup Reviewer1 34 | Subject: Re: [PATCH] Simple test 35 | Date: Tue, 30 Aug 2022 11:19:07 -0400 36 | Message-Id: 37 | In-Reply-To: 38 | References: 39 | 40 | > This is a simple trailer parsing test. 41 | 42 | Reviewed-by: Followup Reviewer1 43 | 44 | -- 45 | My sig 46 | 47 | From foo@z Thu Jan 1 00:00:00 1970 48 | From: Followup Reviewer2 49 | Subject: Re: [PATCH] Simple test 50 | Date: Tue, 30 Aug 2022 11:19:07 -0400 51 | Message-Id: 52 | In-Reply-To: 53 | References: 54 | 55 | >> This is a simple trailer parsing test. 56 | > 57 | > Reviewed-by: Followup Reviewer1 58 | 59 | Tested-by: Followup Reviewer2 60 | 61 | -- 62 | My sig 63 | 64 | From foo@z Thu Jan 1 00:00:00 1970 65 | From: Mismatched Reviewer 66 | Subject: Re: [PATCH] Simple test 67 | Date: Tue, 30 Aug 2022 11:19:07 -0400 68 | Message-Id: 69 | In-Reply-To: 70 | References: 71 | 72 | > This is a simple trailer parsing test. 73 | 74 | Reviewed-by: Mismatched Reviewer1 75 | 76 | -- 77 | My sig 78 | 79 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-stripped-lines-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | 18 | --- a/b4/junk.py 19 | +++ b/b4/junk.py 20 | @@@ -1,1 +1,1 @@ def junk(): 21 | 22 | 23 | -junk1 24 | +junk2 25 | 26 | 27 | -- 28 | 2.wong.fu 29 | 30 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-stripped-lines.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | 17 | --- a/b4/junk.py 18 | +++ b/b4/junk.py 19 | @@@ -1,1 +1,1 @@ def junk(): 20 | 21 | 22 | -junk1 23 | +junk2 24 | 25 | 26 | -- 27 | 2.wong.fu 28 | 29 | From foo@z Thu Jan 1 00:00:00 1970 30 | From: Followup Reviewer1 31 | Subject: Re: [PATCH] Simple test 32 | Date: Tue, 30 Aug 2022 11:19:07 -0400 33 | Message-Id: 34 | In-Reply-To: 35 | References: 36 | 37 | > This is a simple trailer parsing test. 38 | 39 | Reviewed-by: Followup Reviewer1 40 | 41 | -- 42 | My sig 43 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-with-cover-ref-addlink.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH v2 1/2] Simple test 1 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test patch 1. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Coverletter Reviewer1 17 | Link: https://lore.kernel.org/r/patch-1-message@example.com 18 | Signed-off-by: Test Override 19 | 20 | diff --git a/b4/junk.py b/b4/junk.py 21 | index 12345678..23456789 100644 22 | --- a/b4/junk.py 23 | +++ b/b4/junk.py 24 | @@@ -1,1 +1,1 @@ def junk(): 25 | 26 | 27 | -junk1 28 | +junk2 29 | 30 | 31 | -- 32 | 2.wong.fu 33 | 34 | From git@z Thu Jan 1 00:00:00 1970 35 | Subject: [PATCH v2 2/2] Simple test 2 36 | From: Test Test 37 | Date: Tue, 30 Aug 2022 11:19:07 -0400 38 | Message-Id: 39 | MIME-Version: 1.0 40 | Content-Type: text/plain; charset="utf-8" 41 | Content-Transfer-Encoding: 7bit 42 | 43 | Follow-up trailer collating test patch 2. 44 | 45 | Fixes: abcdef01234567890 46 | Reviewed-by: Original Reviewer 47 | Link: https://msgid.link/some@msgid.here 48 | Signed-off-by: Original Submitter 49 | Reviewed-by: Followup Reviewer1 50 | Reviewed-by: Coverletter Reviewer1 51 | Link: https://lore.kernel.org/r/patch-2-message@example.com 52 | Signed-off-by: Test Override 53 | 54 | diff --git a/b4/bupkes.py b/b4/bupkes.py 55 | index 12345678..23456789 100644 56 | --- a/b4/bupkes.py 57 | +++ b/b4/bupkes.py 58 | @@@ -1,1 +1,1 @@ def bupkes(): 59 | 60 | 61 | -bupkes1 62 | +bupkes2 63 | 64 | 65 | -- 66 | 2.wong.fu 67 | 68 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-with-cover-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH v2 1/2] Simple test 1 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test patch 1. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Coverletter Reviewer1 17 | Signed-off-by: Test Override 18 | 19 | diff --git a/b4/junk.py b/b4/junk.py 20 | index 12345678..23456789 100644 21 | --- a/b4/junk.py 22 | +++ b/b4/junk.py 23 | @@@ -1,1 +1,1 @@ def junk(): 24 | 25 | 26 | -junk1 27 | +junk2 28 | 29 | 30 | -- 31 | 2.wong.fu 32 | 33 | From git@z Thu Jan 1 00:00:00 1970 34 | Subject: [PATCH v2 2/2] Simple test 2 35 | From: Test Test 36 | Date: Tue, 30 Aug 2022 11:19:07 -0400 37 | Message-Id: 38 | MIME-Version: 1.0 39 | Content-Type: text/plain; charset="utf-8" 40 | Content-Transfer-Encoding: 7bit 41 | 42 | Follow-up trailer collating test patch 2. 43 | 44 | Fixes: abcdef01234567890 45 | Reviewed-by: Original Reviewer 46 | Link: https://msgid.link/some@msgid.here 47 | Signed-off-by: Original Submitter 48 | Reviewed-by: Followup Reviewer1 49 | Reviewed-by: Coverletter Reviewer1 50 | Signed-off-by: Test Override 51 | 52 | diff --git a/b4/bupkes.py b/b4/bupkes.py 53 | index 12345678..23456789 100644 54 | --- a/b4/bupkes.py 55 | +++ b/b4/bupkes.py 56 | @@@ -1,1 +1,1 @@ def bupkes(): 57 | 58 | 59 | -bupkes1 60 | +bupkes2 61 | 62 | 63 | -- 64 | 2.wong.fu 65 | 66 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-with-cover.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH v2 0/2] Simple cover 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | This is a cover letter. It has a diffstat. 11 | 12 | --- 13 | b4/junk.py | 1 - 14 | b4/bupkes.py | 1 - 15 | 2 files changed, 2 insertions(+), 2 deletions(-) 16 | 17 | 18 | From foo@z Thu Jan 1 00:00:00 1970 19 | From: Test Test 20 | Subject: [PATCH v2 1/2] Simple test 1 21 | To: Some List 22 | Cc: Dev Eloper1 , 23 | Dev Eloper2 24 | Date: Tue, 30 Aug 2022 11:19:07 -0400 25 | Message-Id: 26 | In-Reply-To: 27 | References: 28 | 29 | Follow-up trailer collating test patch 1. 30 | 31 | Fixes: abcdef01234567890 32 | Reviewed-by: Original Reviewer 33 | Link: https://msgid.link/some@msgid.here 34 | Signed-off-by: Original Submitter 35 | --- 36 | 37 | diff --git a/b4/junk.py b/b4/junk.py 38 | index 12345678..23456789 100644 39 | --- a/b4/junk.py 40 | +++ b/b4/junk.py 41 | @@@ -1,1 +1,1 @@ def junk(): 42 | 43 | 44 | -junk1 45 | +junk2 46 | 47 | 48 | -- 49 | 2.wong.fu 50 | 51 | From foo@z Thu Jan 1 00:00:00 1970 52 | From: Test Test 53 | Subject: [PATCH v2 2/2] Simple test 2 54 | To: Some List 55 | Cc: Dev Eloper1 , 56 | Dev Eloper2 57 | Date: Tue, 30 Aug 2022 11:19:07 -0400 58 | Message-Id: 59 | In-Reply-To: 60 | References: 61 | 62 | Follow-up trailer collating test patch 2. 63 | 64 | Fixes: abcdef01234567890 65 | Reviewed-by: Original Reviewer 66 | Link: https://msgid.link/some@msgid.here 67 | Signed-off-by: Original Submitter 68 | --- 69 | 70 | diff --git a/b4/bupkes.py b/b4/bupkes.py 71 | index 12345678..23456789 100644 72 | --- a/b4/bupkes.py 73 | +++ b/b4/bupkes.py 74 | @@@ -1,1 +1,1 @@ def bupkes(): 75 | 76 | 77 | -bupkes1 78 | +bupkes2 79 | 80 | 81 | -- 82 | 2.wong.fu 83 | 84 | From foo@z Thu Jan 1 00:00:00 1970 85 | From: Followup Reviewer1 86 | Subject: Re: [PATCH v2 2/2] Simple test 2 87 | Date: Tue, 30 Aug 2022 11:19:07 -0400 88 | Message-Id: 89 | In-Reply-To: 90 | References: 91 | 92 | > This is a simple trailer parsing test. 93 | 94 | Reviewed-by: Followup Reviewer1 95 | 96 | -- 97 | My sig 98 | 99 | From foo@z Thu Jan 1 00:00:00 1970 100 | From: Followup Reviewer1 101 | Subject: Re: [PATCH v2 0/2] Simple cover 102 | Date: Tue, 30 Aug 2022 11:19:07 -0400 103 | Message-Id: 104 | In-Reply-To: 105 | References: 106 | 107 | > This is a simple trailer parsing test. 108 | 109 | Reviewed-by: Coverletter Reviewer1 110 | 111 | -- 112 | My sig 113 | 114 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-with-diffstat-ref-defaults.txt: -------------------------------------------------------------------------------- 1 | From git@z Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH] Simple test 3 | From: Test Test 4 | Date: Tue, 30 Aug 2022 11:19:07 -0400 5 | Message-Id: 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; charset="utf-8" 8 | Content-Transfer-Encoding: 7bit 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | Reviewed-by: Followup Reviewer1 17 | --- 18 | b4/junk.py | 1 +- 19 | 1 file changed, 1 insertion(+), 1 deletion(-) 20 | 21 | diff --git a/b4/junk.py b/b4/junk.py 22 | index 12345678..23456789 100644 23 | --- a/b4/junk.py 24 | +++ b/b4/junk.py 25 | @@@ -1,1 +1,1 @@ def junk(): 26 | 27 | 28 | -junk1 29 | +junk2 30 | 31 | 32 | -- 33 | 2.wong.fu 34 | 35 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-followup-with-diffstat.mbox: -------------------------------------------------------------------------------- 1 | From foo@z Thu Jan 1 00:00:00 1970 2 | From: Test Test 3 | Subject: [PATCH] Simple test 4 | To: Some List 5 | Cc: Dev Eloper1 , 6 | Dev Eloper2 7 | Date: Tue, 30 Aug 2022 11:19:07 -0400 8 | Message-Id: 9 | 10 | Follow-up trailer collating test. 11 | 12 | Fixes: abcdef01234567890 13 | Reviewed-by: Original Reviewer 14 | Link: https://msgid.link/some@msgid.here 15 | Signed-off-by: Original Submitter 16 | --- 17 | b4/junk.py | 1 +- 18 | 1 file changed, 1 insertion(+), 1 deletion(-) 19 | 20 | diff --git a/b4/junk.py b/b4/junk.py 21 | index 12345678..23456789 100644 22 | --- a/b4/junk.py 23 | +++ b/b4/junk.py 24 | @@@ -1,1 +1,1 @@ def junk(): 25 | 26 | 27 | -junk1 28 | +junk2 29 | 30 | 31 | -- 32 | 2.wong.fu 33 | 34 | From foo@z Thu Jan 1 00:00:00 1970 35 | From: Followup Reviewer1 36 | Subject: Re: [PATCH] Simple test 37 | Date: Tue, 30 Aug 2022 11:19:07 -0400 38 | Message-Id: 39 | In-Reply-To: 40 | References: 41 | 42 | > This is a simple trailer parsing test. 43 | 44 | Reviewed-by: Followup Reviewer1 45 | 46 | -- 47 | My sig 48 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-test-extinfo.txt: -------------------------------------------------------------------------------- 1 | From: Test Test 2 | Subject: [PATCH] Simple test 3 | Date: Tue, 30 Aug 2022 11:19:07 -0400 4 | 5 | This is a simple trailer parsing test. 6 | 7 | Reported-by: Some, One 8 | Reviewed-by: Bogus Bupkes 9 | [for the parts that are bogus] 10 | Fixes: abcdef01234567890 11 | Tested-by: Some Person 12 | [this person visually indented theirs] 13 | Link: https://msgid.link/some@msgid.here # initial submission 14 | Signed-off-by: Wrapped Persontrailer 15 | 16 | --- 17 | 18 | diff --git a/b4/junk.py b/b4/junk.py 19 | index 12345678..23456789 100644 20 | --- a/b4/junk.py 21 | +++ b/b4/junk.py 22 | @@@ -1,1 +1,1 @@ def junk(): 23 | 24 | 25 | -junk1 26 | +junk2 27 | 28 | 29 | -- 30 | 2.wong.fu 31 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-test-simple.txt: -------------------------------------------------------------------------------- 1 | From: Test Test 2 | Subject: [PATCH] Simple test 3 | Date: Tue, 30 Aug 2022 11:19:07 -0400 4 | 5 | This is a simple trailer parsing test. 6 | 7 | Reported-by: "Doe, Jane" 8 | Reviewed-by: Bogus Bupkes 9 | Fixes: abcdef01234567890 10 | Link: https://msgid.link/some@msgid.here 11 | --- 12 | 13 | diff --git a/b4/junk.py b/b4/junk.py 14 | index 12345678..23456789 100644 15 | --- a/b4/junk.py 16 | +++ b/b4/junk.py 17 | @@@ -1,1 +1,1 @@ def junk(): 18 | 19 | 20 | -junk1 21 | +junk2 22 | 23 | 24 | -- 25 | 2.wong.fu 26 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-thread-with-cover-followup.mbox: -------------------------------------------------------------------------------- 1 | From mboxrd@git Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH 0/4] This is a cover for test series 1 3 | MIME-Version: 1.0 4 | Content-Type: text/plain; charset="utf-8" 5 | Content-Transfer-Encoding: 8bit 6 | From: Konstantin Ryabitsev 7 | Date: Tue, 25 Oct 2022 13:38:41 -0400 8 | Message-Id: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 9 | To: list@example.org 10 | 11 | Test patches for pytest. 12 | 13 | Signed-off-by: Konstantin Ryabitsev 14 | 15 | --- 16 | Konstantin Ryabitsev (4): 17 | Remove line 2 from file2 18 | Add more lines to file 1 19 | Add some paragraphs to lipsum 20 | Minor typo changes imitation 21 | 22 | file1.txt | 12 ++++++++++++ 23 | file2.txt | 1 - 24 | lipsum.txt | 14 ++++++++++++-- 25 | 3 files changed, 24 insertions(+), 3 deletions(-) 26 | --- 27 | base-commit: f435c12df7c0ecf20ab8937859e63cddffacabb4 28 | change-id: 20221025-test1-e8520c2200a3 29 | 30 | Best regards, 31 | -- 32 | Konstantin Ryabitsev 33 | 34 | From mboxrd@git Thu Jan 1 00:00:00 1970 35 | From: Konstantin Ryabitsev 36 | Date: Tue, 25 Oct 2022 13:38:42 -0400 37 | Subject: [PATCH 1/4] Remove line 2 from file2 38 | MIME-Version: 1.0 39 | Content-Type: text/plain; charset="utf-8" 40 | Content-Transfer-Encoding: 8bit 41 | Message-Id: <20221025-test1-v1-1-e4f28f57990c@linuxfoundation.org> 42 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 43 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 44 | To: list@example.org 45 | 46 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 47 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 48 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 49 | ac ante. Mauris sed faucibus orci. 50 | 51 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 52 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 53 | Nullam efficitur quis turpis quis sodales. 54 | 55 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 56 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 57 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 58 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 59 | tristique felis. Aenean quis tempus enim. 60 | 61 | Signed-off-by: Konstantin Ryabitsev 62 | --- 63 | file2.txt | 1 - 64 | 1 file changed, 1 deletion(-) 65 | 66 | diff --git a/file2.txt b/file2.txt 67 | index d5a0124..3eac351 100644 68 | --- a/file2.txt 69 | +++ b/file2.txt 70 | @@ -1,2 +1 @@ 71 | This is file 2. 72 | -This is a new line in file 2. 73 | 74 | -- 75 | b4 0.11.0-dev-58177 76 | 77 | From mboxrd@git Thu Jan 1 00:00:00 1970 78 | From: Konstantin Ryabitsev 79 | Date: Tue, 25 Oct 2022 13:38:43 -0400 80 | Subject: [PATCH 2/4] Add more lines to file 1 81 | MIME-Version: 1.0 82 | Content-Type: text/plain; charset="utf-8" 83 | Content-Transfer-Encoding: 8bit 84 | Message-Id: <20221025-test1-v1-2-e4f28f57990c@linuxfoundation.org> 85 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 86 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 87 | To: list@example.org 88 | 89 | This is a second patch in the series. It needed a paragraph with the 90 | words of wisdom. 91 | 92 | Signed-off-by: Konstantin Ryabitsev 93 | --- 94 | file1.txt | 12 ++++++++++++ 95 | 1 file changed, 12 insertions(+) 96 | 97 | diff --git a/file1.txt b/file1.txt 98 | index b352682..936a0c8 100644 99 | --- a/file1.txt 100 | +++ b/file1.txt 101 | @@ -1,3 +1,15 @@ 102 | This is file 1. 103 | It has a single line. 104 | This is a second line I added. 105 | +This is a third line that belongs here. 106 | + 107 | +As well as the following words of wisdom: 108 | + 109 | +Duis rutrum eu urna eu viverra. Curabitur vehicula ut nisl id accumsan. 110 | +Praesent condimentum mattis rutrum. Maecenas tincidunt ipsum nec hendrerit 111 | +pulvinar. Suspendisse sed commodo nisl, vitae tincidunt libero. Donec lacus 112 | +ante, maximus eu nulla in, lacinia aliquam sem. Fusce efficitur nisl elit, et 113 | +sodales nisi pellentesque in. Nulla eros sem, sagittis sit amet nisi non, 114 | +venenatis accumsan augue. Sed ipsum ligula, sodales nec pharetra eget, congue 115 | +id mi. Duis et accumsan lacus, in sollicitudin metus. In eu velit ut tortor 116 | +finibus sodales. 117 | 118 | -- 119 | b4 0.11.0-dev-58177 120 | 121 | From mboxrd@git Thu Jan 1 00:00:00 1970 122 | From: Konstantin Ryabitsev 123 | Date: Tue, 25 Oct 2022 13:38:44 -0400 124 | Subject: [PATCH 3/4] Add some paragraphs to lipsum 125 | MIME-Version: 1.0 126 | Content-Type: text/plain; charset="utf-8" 127 | Content-Transfer-Encoding: 8bit 128 | Message-Id: <20221025-test1-v1-3-e4f28f57990c@linuxfoundation.org> 129 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 130 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 131 | To: list@example.org 132 | 133 | Mostly junk. As expected. 134 | 135 | Signed-off-by: Konstantin Ryabitsev 136 | --- 137 | lipsum.txt | 14 ++++++++++++-- 138 | 1 file changed, 12 insertions(+), 2 deletions(-) 139 | 140 | diff --git a/lipsum.txt b/lipsum.txt 141 | index d8f8dc5..750dabb 100644 142 | --- a/lipsum.txt 143 | +++ b/lipsum.txt 144 | @@ -4,9 +4,19 @@ est. Proin vestibulum enim et sagittis eleifend. Maecenas mattis, felis ac 145 | aliquet gravida, risus erat tempor sapien, tempor ultricies urna magna non 146 | urna. Nam luctus lorem a enim pulvinar, eget viverra dui viverra. Praesent ut 147 | libero a lectus posuere tempus. Interdum et malesuada fames ac ante ipsum 148 | -primis in faucibus. Phasellus cursus lectus sed metus interdum aliquet. Ut non 149 | +primis in faucibus. Phasellius cursus lectus sed metus interdum aliquet. Ut non 150 | erat consectetur, pretium quam at, maximus nisl. Donec tempus facilisis ex sit 151 | amet condimentum. Suspendisse vitae diam sem. Donec ligula tellus, scelerisque 152 | -efficitur mauris non, euismod auctor urna. Morbi ac hendrerit erat. Phasellus 153 | +efficitur mauris non, euismodae auctor urna. Morbi ac hendrerit erat. Phasellus 154 | at mauris id dui malesuada porta ut et justo. Integer convallis quis ligula 155 | vitae sollicitudin. Nulla sit amet tincidunt nulla, eget vestibulum massa. 156 | + 157 | +Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur nec dui 158 | +ut lacus vehicula aliquet. Curabitur ac tincidunt risus. Etiam in eros massa. 159 | +Curabitur scelerisque orci non justo sollicitudin bibendum. Sed quis risus 160 | +imperdiet, tincidunt quam eget, consectetur eros. Maecenas sollicitudin augue 161 | +quis odio fermentum, eget elementum ipsum maximus. Etiam quam odio, tempus nec 162 | +posuere at, facilisis nec turpis. 163 | + 164 | +Curabitur porttitor sit amet odio ac rutrum. 165 | +Integer bibendum metus eu bibendum porttitor. 166 | 167 | -- 168 | b4 0.11.0-dev-58177 169 | 170 | From mboxrd@git Thu Jan 1 00:00:00 1970 171 | From: Konstantin Ryabitsev 172 | Date: Tue, 25 Oct 2022 13:38:45 -0400 173 | Subject: [PATCH 4/4] Minor typo changes imitation 174 | MIME-Version: 1.0 175 | Content-Type: text/plain; charset="utf-8" 176 | Content-Transfer-Encoding: 8bit 177 | Message-Id: <20221025-test1-v1-4-e4f28f57990c@linuxfoundation.org> 178 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 179 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 180 | To: list@example.org 181 | 182 | Life imitatus artem. 183 | 184 | Signed-off-by: Konstantin Ryabitsev 185 | --- 186 | lipsum.txt | 4 ++-- 187 | 1 file changed, 2 insertions(+), 2 deletions(-) 188 | 189 | diff --git a/lipsum.txt b/lipsum.txt 190 | index 750dabb..d304f7f 100644 191 | --- a/lipsum.txt 192 | +++ b/lipsum.txt 193 | @@ -13,10 +13,10 @@ vitae sollicitudin. Nulla sit amet tincidunt nulla, eget vestibulum massa. 194 | 195 | Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur nec dui 196 | ut lacus vehicula aliquet. Curabitur ac tincidunt risus. Etiam in eros massa. 197 | -Curabitur scelerisque orci non justo sollicitudin bibendum. Sed quis risus 198 | +Curabitur scelerisque orci non justo sollicitudin vivendum. Sed quis risus 199 | imperdiet, tincidunt quam eget, consectetur eros. Maecenas sollicitudin augue 200 | quis odio fermentum, eget elementum ipsum maximus. Etiam quam odio, tempus nec 201 | posuere at, facilisis nec turpis. 202 | 203 | Curabitur porttitor sit amet odio ac rutrum. 204 | -Integer bibendum metus eu bibendum porttitor. 205 | +Floatus bibendum metus eu bibendum porttitor. 206 | 207 | -- 208 | b4 0.11.0-dev-58177 209 | 210 | 211 | From mboxrd@git Thu Jan 1 00:00:00 1970 212 | From: Follow Upper 213 | Date: Tue, 25 Oct 2022 13:38:45 -0400 214 | Subject: Re: [PATCH 4/4] Minor typo changes imitation 215 | MIME-Version: 1.0 216 | Content-Type: text/plain; charset="utf-8" 217 | Content-Transfer-Encoding: 8bit 218 | Message-Id: 219 | In-Reply-To: <20221025-test1-v1-4-e4f28f57990c@linuxfoundation.org> 220 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> <20221025-test1-v1-4-e4f28f57990c@linuxfoundation.org> 221 | To: list@example.org 222 | 223 | > Life imitatus artem. 224 | > 225 | > Signed-off-by: Konstantin Ryabitsev 226 | 227 | Tested-by: Follow Upper 228 | Link: https://example.org 229 | Closes: https://example.org/bug/1234 230 | 231 | -- 232 | Follow Upper 233 | 234 | From mboxrd@git Thu Jan 1 00:00:00 1970 235 | From: Cover Upper 236 | Date: Tue, 25 Oct 2022 13:38:45 -0400 237 | Subject: Re: [PATCH 0/4] This is a cover for test series 1 238 | MIME-Version: 1.0 239 | Content-Type: text/plain; charset="utf-8" 240 | Content-Transfer-Encoding: 8bit 241 | Message-Id: 242 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 243 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 244 | To: list@example.org 245 | 246 | > Test patches for pytest. 247 | 248 | Reviewed-by: Cover Upper 249 | 250 | -- 251 | Cover Upper 252 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-thread-with-cover-followup.verify: -------------------------------------------------------------------------------- 1 | konstantin@linuxfoundation.org 2 | Minor typo changes imitation 3 | Life imitatus artem. 4 | 5 | Signed-off-by: Konstantin Ryabitsev 6 | Tested-by: Follow Upper 7 | Link: https://example.org 8 | Closes: https://example.org/bug/1234 9 | Reviewed-by: Cover Upper 10 | Signed-off-by: Test Override 11 | --- 12 | konstantin@linuxfoundation.org 13 | Add some paragraphs to lipsum 14 | Mostly junk. As expected. 15 | 16 | Signed-off-by: Konstantin Ryabitsev 17 | Reviewed-by: Cover Upper 18 | Signed-off-by: Test Override 19 | --- 20 | konstantin@linuxfoundation.org 21 | Add more lines to file 1 22 | This is a second patch in the series. It needed a paragraph with the 23 | words of wisdom. 24 | 25 | Signed-off-by: Konstantin Ryabitsev 26 | Reviewed-by: Cover Upper 27 | Signed-off-by: Test Override 28 | --- 29 | konstantin@linuxfoundation.org 30 | Remove line 2 from file2 31 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 32 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 33 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 34 | ac ante. Mauris sed faucibus orci. 35 | 36 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 37 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 38 | Nullam efficitur quis turpis quis sodales. 39 | 40 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 41 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 42 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 43 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 44 | tristique felis. Aenean quis tempus enim. 45 | 46 | Signed-off-by: Konstantin Ryabitsev 47 | Reviewed-by: Cover Upper 48 | Signed-off-by: Test Override 49 | --- 50 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-thread-with-followups-and-tripledash.verify: -------------------------------------------------------------------------------- 1 | konstantin@linuxfoundation.org 2 | Minor typo changes imitation 3 | Life imitatus artem. 4 | 5 | Signed-off-by: Konstantin Ryabitsev 6 | Reviewed-by: Follow Upper 7 | --- 8 | This commit has extra stuff. 9 | --- 10 | konstantin@linuxfoundation.org 11 | Add some paragraphs to lipsum 12 | Mostly junk. As expected. 13 | 14 | Signed-off-by: Konstantin Ryabitsev 15 | --- 16 | konstantin@linuxfoundation.org 17 | Add more lines to file 1 18 | This is a second patch in the series. It needed a paragraph with the 19 | words of wisdom. 20 | 21 | Signed-off-by: Konstantin Ryabitsev 22 | --- 23 | konstantin@linuxfoundation.org 24 | Remove line 2 from file2 25 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 26 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 27 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 28 | ac ante. Mauris sed faucibus orci. 29 | 30 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 31 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 32 | Nullam efficitur quis turpis quis sodales. 33 | 34 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 35 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 36 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 37 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 38 | tristique felis. Aenean quis tempus enim. 39 | 40 | Signed-off-by: Konstantin Ryabitsev 41 | --- 42 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-thread-with-followups-no-match.verify: -------------------------------------------------------------------------------- 1 | konstantin@linuxfoundation.org 2 | Minor typo changes imitation 3 | Life imitatus artem. 4 | 5 | Signed-off-by: Konstantin Ryabitsev 6 | Signed-off-by: Test Override 7 | --- 8 | konstantin@linuxfoundation.org 9 | Add some paragraphs to lipsum 10 | Mostly junk. As expected. 11 | 12 | Signed-off-by: Konstantin Ryabitsev 13 | Signed-off-by: Test Override 14 | --- 15 | konstantin@linuxfoundation.org 16 | Add more lines to file 1 17 | This is a second patch in the series. It needed a paragraph with the 18 | words of wisdom. 19 | 20 | Signed-off-by: Konstantin Ryabitsev 21 | Signed-off-by: Test Override 22 | --- 23 | konstantin@linuxfoundation.org 24 | Remove line 2 from file2 25 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 26 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 27 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 28 | ac ante. Mauris sed faucibus orci. 29 | 30 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 31 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 32 | Nullam efficitur quis turpis quis sodales. 33 | 34 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 35 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 36 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 37 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 38 | tristique felis. Aenean quis tempus enim. 39 | 40 | Signed-off-by: Konstantin Ryabitsev 41 | Signed-off-by: Test Override 42 | --- 43 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-thread-with-followups.mbox: -------------------------------------------------------------------------------- 1 | From mboxrd@git Thu Jan 1 00:00:00 1970 2 | Subject: [PATCH 0/4] This is a cover for test series 1 3 | MIME-Version: 1.0 4 | Content-Type: text/plain; charset="utf-8" 5 | Content-Transfer-Encoding: 8bit 6 | From: Konstantin Ryabitsev 7 | Date: Tue, 25 Oct 2022 13:38:41 -0400 8 | Message-Id: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 9 | To: list@example.org 10 | 11 | Test patches for pytest. 12 | 13 | Signed-off-by: Konstantin Ryabitsev 14 | 15 | --- 16 | Konstantin Ryabitsev (4): 17 | Remove line 2 from file2 18 | Add more lines to file 1 19 | Add some paragraphs to lipsum 20 | Minor typo changes imitation 21 | 22 | file1.txt | 12 ++++++++++++ 23 | file2.txt | 1 - 24 | lipsum.txt | 14 ++++++++++++-- 25 | 3 files changed, 24 insertions(+), 3 deletions(-) 26 | --- 27 | base-commit: f435c12df7c0ecf20ab8937859e63cddffacabb4 28 | change-id: 20221025-test1-e8520c2200a3 29 | 30 | Best regards, 31 | -- 32 | Konstantin Ryabitsev 33 | 34 | From mboxrd@git Thu Jan 1 00:00:00 1970 35 | From: Konstantin Ryabitsev 36 | Date: Tue, 25 Oct 2022 13:38:42 -0400 37 | Subject: [PATCH 1/4] Remove line 2 from file2 38 | MIME-Version: 1.0 39 | Content-Type: text/plain; charset="utf-8" 40 | Content-Transfer-Encoding: 8bit 41 | Message-Id: <20221025-test1-v1-1-e4f28f57990c@linuxfoundation.org> 42 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 43 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 44 | To: list@example.org 45 | 46 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 47 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 48 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 49 | ac ante. Mauris sed faucibus orci. 50 | 51 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 52 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 53 | Nullam efficitur quis turpis quis sodales. 54 | 55 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 56 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 57 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 58 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 59 | tristique felis. Aenean quis tempus enim. 60 | 61 | Signed-off-by: Konstantin Ryabitsev 62 | --- 63 | file2.txt | 1 - 64 | 1 file changed, 1 deletion(-) 65 | 66 | diff --git a/file2.txt b/file2.txt 67 | index d5a0124..3eac351 100644 68 | --- a/file2.txt 69 | +++ b/file2.txt 70 | @@ -1,2 +1 @@ 71 | This is file 2. 72 | -This is a new line in file 2. 73 | 74 | -- 75 | b4 0.11.0-dev-58177 76 | 77 | From mboxrd@git Thu Jan 1 00:00:00 1970 78 | From: Konstantin Ryabitsev 79 | Date: Tue, 25 Oct 2022 13:38:43 -0400 80 | Subject: [PATCH 2/4] Add more lines to file 1 81 | MIME-Version: 1.0 82 | Content-Type: text/plain; charset="utf-8" 83 | Content-Transfer-Encoding: 8bit 84 | Message-Id: <20221025-test1-v1-2-e4f28f57990c@linuxfoundation.org> 85 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 86 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 87 | To: list@example.org 88 | 89 | This is a second patch in the series. It needed a paragraph with the 90 | words of wisdom. 91 | 92 | Signed-off-by: Konstantin Ryabitsev 93 | --- 94 | file1.txt | 12 ++++++++++++ 95 | 1 file changed, 12 insertions(+) 96 | 97 | diff --git a/file1.txt b/file1.txt 98 | index b352682..936a0c8 100644 99 | --- a/file1.txt 100 | +++ b/file1.txt 101 | @@ -1,3 +1,15 @@ 102 | This is file 1. 103 | It has a single line. 104 | This is a second line I added. 105 | +This is a third line that belongs here. 106 | + 107 | +As well as the following words of wisdom: 108 | + 109 | +Duis rutrum eu urna eu viverra. Curabitur vehicula ut nisl id accumsan. 110 | +Praesent condimentum mattis rutrum. Maecenas tincidunt ipsum nec hendrerit 111 | +pulvinar. Suspendisse sed commodo nisl, vitae tincidunt libero. Donec lacus 112 | +ante, maximus eu nulla in, lacinia aliquam sem. Fusce efficitur nisl elit, et 113 | +sodales nisi pellentesque in. Nulla eros sem, sagittis sit amet nisi non, 114 | +venenatis accumsan augue. Sed ipsum ligula, sodales nec pharetra eget, congue 115 | +id mi. Duis et accumsan lacus, in sollicitudin metus. In eu velit ut tortor 116 | +finibus sodales. 117 | 118 | -- 119 | b4 0.11.0-dev-58177 120 | 121 | From mboxrd@git Thu Jan 1 00:00:00 1970 122 | From: Konstantin Ryabitsev 123 | Date: Tue, 25 Oct 2022 13:38:44 -0400 124 | Subject: [PATCH 3/4] Add some paragraphs to lipsum 125 | MIME-Version: 1.0 126 | Content-Type: text/plain; charset="utf-8" 127 | Content-Transfer-Encoding: 8bit 128 | Message-Id: <20221025-test1-v1-3-e4f28f57990c@linuxfoundation.org> 129 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 130 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 131 | To: list@example.org 132 | 133 | Mostly junk. As expected. 134 | 135 | Signed-off-by: Konstantin Ryabitsev 136 | --- 137 | lipsum.txt | 14 ++++++++++++-- 138 | 1 file changed, 12 insertions(+), 2 deletions(-) 139 | 140 | diff --git a/lipsum.txt b/lipsum.txt 141 | index d8f8dc5..750dabb 100644 142 | --- a/lipsum.txt 143 | +++ b/lipsum.txt 144 | @@ -4,9 +4,19 @@ est. Proin vestibulum enim et sagittis eleifend. Maecenas mattis, felis ac 145 | aliquet gravida, risus erat tempor sapien, tempor ultricies urna magna non 146 | urna. Nam luctus lorem a enim pulvinar, eget viverra dui viverra. Praesent ut 147 | libero a lectus posuere tempus. Interdum et malesuada fames ac ante ipsum 148 | -primis in faucibus. Phasellus cursus lectus sed metus interdum aliquet. Ut non 149 | +primis in faucibus. Phasellius cursus lectus sed metus interdum aliquet. Ut non 150 | erat consectetur, pretium quam at, maximus nisl. Donec tempus facilisis ex sit 151 | amet condimentum. Suspendisse vitae diam sem. Donec ligula tellus, scelerisque 152 | -efficitur mauris non, euismod auctor urna. Morbi ac hendrerit erat. Phasellus 153 | +efficitur mauris non, euismodae auctor urna. Morbi ac hendrerit erat. Phasellus 154 | at mauris id dui malesuada porta ut et justo. Integer convallis quis ligula 155 | vitae sollicitudin. Nulla sit amet tincidunt nulla, eget vestibulum massa. 156 | + 157 | +Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur nec dui 158 | +ut lacus vehicula aliquet. Curabitur ac tincidunt risus. Etiam in eros massa. 159 | +Curabitur scelerisque orci non justo sollicitudin bibendum. Sed quis risus 160 | +imperdiet, tincidunt quam eget, consectetur eros. Maecenas sollicitudin augue 161 | +quis odio fermentum, eget elementum ipsum maximus. Etiam quam odio, tempus nec 162 | +posuere at, facilisis nec turpis. 163 | + 164 | +Curabitur porttitor sit amet odio ac rutrum. 165 | +Integer bibendum metus eu bibendum porttitor. 166 | 167 | -- 168 | b4 0.11.0-dev-58177 169 | 170 | From mboxrd@git Thu Jan 1 00:00:00 1970 171 | From: Konstantin Ryabitsev 172 | Date: Tue, 25 Oct 2022 13:38:45 -0400 173 | Subject: [PATCH 4/4] Minor typo changes imitation 174 | MIME-Version: 1.0 175 | Content-Type: text/plain; charset="utf-8" 176 | Content-Transfer-Encoding: 8bit 177 | Message-Id: <20221025-test1-v1-4-e4f28f57990c@linuxfoundation.org> 178 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 179 | In-Reply-To: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> 180 | To: list@example.org 181 | 182 | Life imitatus artem. 183 | 184 | Signed-off-by: Konstantin Ryabitsev 185 | --- 186 | lipsum.txt | 4 ++-- 187 | 1 file changed, 2 insertions(+), 2 deletions(-) 188 | 189 | diff --git a/lipsum.txt b/lipsum.txt 190 | index 750dabb..d304f7f 100644 191 | --- a/lipsum.txt 192 | +++ b/lipsum.txt 193 | @@ -13,10 +13,10 @@ vitae sollicitudin. Nulla sit amet tincidunt nulla, eget vestibulum massa. 194 | 195 | Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur nec dui 196 | ut lacus vehicula aliquet. Curabitur ac tincidunt risus. Etiam in eros massa. 197 | -Curabitur scelerisque orci non justo sollicitudin bibendum. Sed quis risus 198 | +Curabitur scelerisque orci non justo sollicitudin vivendum. Sed quis risus 199 | imperdiet, tincidunt quam eget, consectetur eros. Maecenas sollicitudin augue 200 | quis odio fermentum, eget elementum ipsum maximus. Etiam quam odio, tempus nec 201 | posuere at, facilisis nec turpis. 202 | 203 | Curabitur porttitor sit amet odio ac rutrum. 204 | -Integer bibendum metus eu bibendum porttitor. 205 | +Floatus bibendum metus eu bibendum porttitor. 206 | 207 | -- 208 | b4 0.11.0-dev-58177 209 | 210 | 211 | From mboxrd@git Thu Jan 1 00:00:00 1970 212 | From: Follow Upper 213 | Date: Tue, 25 Oct 2022 13:38:45 -0400 214 | Subject: Re: [PATCH 4/4] Minor typo changes imitation 215 | MIME-Version: 1.0 216 | Content-Type: text/plain; charset="utf-8" 217 | Content-Transfer-Encoding: 8bit 218 | Message-Id: 219 | In-Reply-To: <20221025-test1-v1-4-e4f28f57990c@linuxfoundation.org> 220 | References: <20221025-test1-v1-0-e4f28f57990c@linuxfoundation.org> <20221025-test1-v1-4-e4f28f57990c@linuxfoundation.org> 221 | To: list@example.org 222 | 223 | > Life imitatus artem. 224 | > 225 | > Signed-off-by: Konstantin Ryabitsev 226 | 227 | Reviewed-by: Follow Upper 228 | 229 | -- 230 | Follow Upper 231 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-thread-with-followups.verify: -------------------------------------------------------------------------------- 1 | konstantin@linuxfoundation.org 2 | Minor typo changes imitation 3 | Life imitatus artem. 4 | 5 | Signed-off-by: Konstantin Ryabitsev 6 | Reviewed-by: Follow Upper 7 | Signed-off-by: Test Override 8 | --- 9 | konstantin@linuxfoundation.org 10 | Add some paragraphs to lipsum 11 | Mostly junk. As expected. 12 | 13 | Signed-off-by: Konstantin Ryabitsev 14 | Signed-off-by: Test Override 15 | --- 16 | konstantin@linuxfoundation.org 17 | Add more lines to file 1 18 | This is a second patch in the series. It needed a paragraph with the 19 | words of wisdom. 20 | 21 | Signed-off-by: Konstantin Ryabitsev 22 | Signed-off-by: Test Override 23 | --- 24 | konstantin@linuxfoundation.org 25 | Remove line 2 from file2 26 | Etiam in rhoncus lacus. Ut velit nisl, mollis ac commodo vitae, ultrices 27 | quis felis. Proin varius hendrerit volutpat. Pellentesque nec laoreet 28 | quam, eu ullamcorper mi. Donec ut purus ac sapien dignissim elementum eu 29 | ac ante. Mauris sed faucibus orci. 30 | 31 | Vivamus eleifend accumsan ultricies. Cras at erat nec mauris iaculis 32 | eleifend sit amet eu libero. Suspendisse auctor a erat at vestibulum. 33 | Nullam efficitur quis turpis quis sodales. 34 | 35 | Nunc elementum hendrerit arcu eget feugiat. Nulla placerat pellentesque 36 | metus, nec rutrum nulla porttitor vel. Ut tristique commodo sem, ac 37 | sollicitudin enim pharetra et. Mauris sed tellus vitae nunc sollicitudin 38 | fermentum. Phasellus dui elit, malesuada quis metus vel, blandit 39 | tristique felis. Aenean quis tempus enim. 40 | 41 | Signed-off-by: Konstantin Ryabitsev 42 | Signed-off-by: Test Override 43 | --- 44 | -------------------------------------------------------------------------------- /src/tests/samples/trailers-with-tripledash.bundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mricon/b4/6f78e874e96b0b3bac1767a1743b20af20cb0e2f/src/tests/samples/trailers-with-tripledash.bundle -------------------------------------------------------------------------------- /src/tests/test_ez.py: -------------------------------------------------------------------------------- 1 | import pytest # noqa 2 | import os 3 | import b4 4 | import b4.ez 5 | import b4.mbox 6 | import b4.command 7 | 8 | 9 | @pytest.fixture(scope="function") 10 | def prepdir(gitdir): 11 | b4.MAIN_CONFIG.update({'prep-cover-strategy': 'branch-description'}) 12 | parser = b4.command.setup_parser() 13 | b4args = ['--no-stdin', '--no-interactive', '--offline-mode', 'prep', '-n', 'pytest'] 14 | cmdargs = parser.parse_args(b4args) 15 | b4.ez.cmd_prep(cmdargs) 16 | yield gitdir 17 | 18 | 19 | @pytest.mark.parametrize('mboxf, bundlef, rep, trargs, compareargs, compareout, b4cfg', [ 20 | ('trailers-thread-with-followups', None, None, [], 21 | ['log', '--format=%ae%n%s%n%b---', 'HEAD~4..'], 'trailers-thread-with-followups', 22 | {'shazam-am-flags': '--signoff'}), 23 | ('trailers-thread-with-cover-followup', None, None, [], 24 | ['log', '--format=%ae%n%s%n%b---', 'HEAD~4..'], 'trailers-thread-with-cover-followup', 25 | {'shazam-am-flags': '--signoff'}), 26 | # Test matching trailer updates by subject when patch-id changes 27 | ('trailers-thread-with-followups', None, (b'vivendum', b'addendum'), [], 28 | ['log', '--format=%ae%n%s%n%b---', 'HEAD~4..'], 'trailers-thread-with-followups-no-match', 29 | {'shazam-am-flags': '--signoff'}), 30 | # Test that we properly perserve commits with --- in them 31 | ('trailers-thread-with-followups', 'trailers-with-tripledash', None, [], 32 | ['log', '--format=%ae%n%s%n%b---', 'HEAD~4..'], 'trailers-thread-with-followups-and-tripledash', 33 | None), 34 | ]) 35 | def test_trailers(sampledir, prepdir, mboxf, bundlef, rep, trargs, compareargs, compareout, b4cfg): 36 | if b4cfg: 37 | b4.MAIN_CONFIG.update(b4cfg) 38 | config = b4.get_main_config() 39 | mfile = os.path.join(sampledir, f'{mboxf}.mbox') 40 | assert os.path.exists(mfile) 41 | if bundlef: 42 | bfile = os.path.join(sampledir, f'{bundlef}.bundle') 43 | assert os.path.exists(bfile) 44 | gitargs = ['pull', '--rebase', bfile] 45 | out, logstr = b4.git_run_command(None, gitargs) 46 | assert out == 0 47 | else: 48 | assert config.get('shazam-am-flags') == '--signoff' 49 | if rep: 50 | with open(mfile, 'rb') as fh: 51 | contents = fh.read() 52 | contents = contents.replace(rep[0], rep[1]) 53 | tfile = os.path.join(prepdir, '.git', 'modified.mbox') 54 | with open(tfile, 'wb') as fh: 55 | fh.write(contents) 56 | else: 57 | tfile = mfile 58 | b4args = ['--no-stdin', '--no-interactive', '--offline-mode', 'shazam', '--no-add-trailers', '-m', tfile] 59 | parser = b4.command.setup_parser() 60 | 61 | cmdargs = parser.parse_args(b4args) 62 | with pytest.raises(SystemExit) as e: 63 | b4.mbox.main(cmdargs) 64 | assert e.type == SystemExit 65 | assert e.value.code == 0 66 | 67 | cfile = os.path.join(sampledir, f'{compareout}.verify') 68 | assert os.path.exists(cfile) 69 | 70 | parser = b4.command.setup_parser() 71 | b4args = ['--no-stdin', '--no-interactive', '--offline-mode', 'trailers', '--update', '-m', mfile] + trargs 72 | cmdargs = parser.parse_args(b4args) 73 | b4.ez.cmd_trailers(cmdargs) 74 | 75 | out, logstr = b4.git_run_command(None, compareargs) 76 | assert out == 0 77 | with open(cfile, 'r') as fh: 78 | cstr = fh.read() 79 | assert logstr == cstr 80 | 81 | -------------------------------------------------------------------------------- /src/tests/test_mbox.py: -------------------------------------------------------------------------------- 1 | import pytest # noqa 2 | import os 3 | import b4 4 | import b4.mbox 5 | import b4.command 6 | 7 | 8 | @pytest.mark.parametrize('mboxf, shazamargs, compareargs, compareout, b4cfg', [ 9 | ('shazam-git1-just-series', [], 10 | ['log', '--format=%ae%n%ce%n%s%n%b---', 'HEAD~4..'], 'shazam-git1-just-series-defaults', {}), 11 | ('shazam-git1-just-series', ['-H'], 12 | ['log', '--format=%ae%n%ce%n%s%n%b---', 'HEAD..FETCH_HEAD'], 'shazam-git1-just-series-defaults', {}), 13 | ('shazam-git1-just-series', ['-M'], 14 | ['log', '--format=%ae%n%ce%n%s%n%b---', 'HEAD^..'], 'shazam-git1-just-series-merged', {}), 15 | ]) 16 | def test_shazam(sampledir, gitdir, mboxf, shazamargs, compareargs, compareout, b4cfg): 17 | b4.MAIN_CONFIG.update(b4cfg) 18 | mfile = os.path.join(sampledir, f'{mboxf}.mbox') 19 | cfile = os.path.join(sampledir, f'{compareout}.verify') 20 | assert os.path.exists(mfile) 21 | assert os.path.exists(cfile) 22 | parser = b4.command.setup_parser() 23 | shazamargs = ['--no-stdin', '--no-interactive', '--offline-mode', 'shazam', '-m', mfile] + shazamargs 24 | cmdargs = parser.parse_args(shazamargs) 25 | with pytest.raises(SystemExit) as e: 26 | b4.mbox.main(cmdargs) 27 | assert e.type == SystemExit 28 | assert e.value.code == 0 29 | out, logstr = b4.git_run_command(None, compareargs) 30 | assert out == 0 31 | with open(cfile, 'r') as fh: 32 | cstr = fh.read() 33 | assert logstr == cstr 34 | --------------------------------------------------------------------------------