Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fedora-python/importpatches


https://github.com/fedora-python/importpatches

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# importpatches.py

A command to update Fedora Python dist-git spec & patches from a Git repository

Meant to be used with a local clone of [fedora-python/cpython]
which includes tags like `vX.Y.Z` (upstream releases) and branches
like `fedora-X.Y` (`vX.Y.Z` + commits for individual patches).

The summary lines of patch commits must start with `NNNNN: `, where NNNNN is
the patch number (registered in the [patch registry]).
The rest of the commit message should be usable in the spec.

(It also mostly works with the `fedora-2.7` branch, which uses different
conventions.)

[fedora-python/cpython]: https://github.com/fedora-python/cpython
[patch registry]: https://fedoraproject.org/wiki/SIGs/Python/PythonPatches

## Setup

Add the script to your `$PATH`, for example:

ln -s $PWD/importpatches.py ~/.local/bin/importpatches

The script needs to know where your local clone of `fedora-python/cpython` is,
and uses Git configuration as a default.

In your clone of dist-git, run `git config importpatches.upstream .../cpython`.
(Replace `.../cpython` with your clone of `fedora-python/cpython`, of course.)
Alternatively, run `git config` with `--global`
to avoid the need to set this in all dist-git clones of Pythons.

## Usage

Run `importpatches.py` without arguments in your clone of dist-git.
If the defaults don't work for you, run with `--help` to see the options.

## Git hash IDs

The script adds Git hash IDs to the spec file.
These are hashes of the patch content, ignoring tings like context lines and
comments.
When one of these changes, pay special atttention to the patch diff.

## License

The script is available under the MIT license. May it serve you well.