patch-manager 0.0.5__tar.gz → 0.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {patch-manager-0.0.5 → patch_manager-0.0.7}/PKG-INFO +304 -12
- {patch-manager-0.0.5/src/patman → patch_manager-0.0.7}/README.rst +299 -9
- {patch-manager-0.0.5 → patch_manager-0.0.7}/pyproject.toml +3 -3
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patch_manager.egg-info/PKG-INFO +304 -12
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patch_manager.egg-info/SOURCES.txt +8 -1
- patch_manager-0.0.7/src/patch_manager.egg-info/entry_points.txt +2 -0
- patch_manager-0.0.7/src/patch_manager.egg-info/requires.txt +2 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7/src/patman}/README.rst +299 -9
- patch_manager-0.0.7/src/patman/__init__.py +8 -0
- patch_manager-0.0.7/src/patman/__main__.py +59 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/checkpatch.py +11 -6
- patch_manager-0.0.7/src/patman/cmdline.py +516 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/commit.py +1 -1
- patch_manager-0.0.7/src/patman/control.py +333 -0
- patch_manager-0.0.7/src/patman/cser_helper.py +1524 -0
- patch_manager-0.0.7/src/patman/cseries.py +1165 -0
- patch_manager-0.0.7/src/patman/database.py +823 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/func_test.py +276 -313
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/get_maintainer.py +9 -6
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/patchstream.py +74 -16
- patch_manager-0.0.7/src/patman/patchwork.py +852 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/patman.rst +299 -9
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/project.py +3 -2
- patch-manager-0.0.5/src/patman/control.py → patch_manager-0.0.7/src/patman/send.py +81 -130
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/series.py +121 -26
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/settings.py +68 -19
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/setup.py +0 -1
- patch_manager-0.0.7/src/patman/status.py +405 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/test_checkpatch.py +2 -3
- patch_manager-0.0.7/src/patman/test_common.py +254 -0
- patch_manager-0.0.7/src/patman/test_cseries.py +3684 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patman/test_settings.py +1 -1
- patch-manager-0.0.5/src/patch_manager.egg-info/entry_points.txt +0 -2
- patch-manager-0.0.5/src/patch_manager.egg-info/requires.txt +0 -1
- patch-manager-0.0.5/src/patman/__init__.py +0 -5
- patch-manager-0.0.5/src/patman/__main__.py +0 -202
- patch-manager-0.0.5/src/patman/gitutil.py +0 -706
- patch-manager-0.0.5/src/patman/status.py +0 -487
- {patch-manager-0.0.5 → patch_manager-0.0.7}/LICENSE +0 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/setup.cfg +0 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patch_manager.egg-info/dependency_links.txt +0 -0
- {patch-manager-0.0.5 → patch_manager-0.0.7}/src/patch_manager.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: patch-manager
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: Patman patch manager
|
|
5
5
|
Author-email: Simon Glass <sjg@chromium.org>
|
|
6
6
|
Project-URL: Homepage, https://docs.u-boot.org/en/latest/develop/patman.html
|
|
@@ -11,7 +11,9 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Requires-Python: >=3.7
|
|
12
12
|
Description-Content-Type: text/x-rst
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: u_boot_pylib>=0.0.
|
|
14
|
+
Requires-Dist: u_boot_pylib>=0.0.6
|
|
15
|
+
Requires-Dist: aiohttp>=3.9.1
|
|
16
|
+
Dynamic: license-file
|
|
15
17
|
|
|
16
18
|
.. SPDX-License-Identifier: GPL-2.0+
|
|
17
19
|
.. Copyright (c) 2011 The Chromium OS Authors
|
|
@@ -31,12 +33,13 @@ This tool is a Python script which:
|
|
|
31
33
|
- Inserts a cover letter with change lists
|
|
32
34
|
- Runs the patches through checkpatch.pl and its own checks
|
|
33
35
|
- Optionally emails them out to selected people
|
|
36
|
+
- Links the series automatically to Patchwork once sent
|
|
34
37
|
|
|
35
38
|
It also has some Patchwork features:
|
|
36
39
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
+
- Manage local series and their status on patchwork
|
|
41
|
+
- Show review tags from Patchwork and allows them to be gathered into commits
|
|
42
|
+
- List comments received on a series
|
|
40
43
|
|
|
41
44
|
It is intended to automate patch creation and make it a less
|
|
42
45
|
error-prone process. It is useful for U-Boot and Linux work so far,
|
|
@@ -159,7 +162,7 @@ patman.py. For reference, the useful ones (at the moment) shown below
|
|
|
159
162
|
process_tags: False
|
|
160
163
|
verbose: True
|
|
161
164
|
smtp_server: /path/to/sendmail
|
|
162
|
-
|
|
165
|
+
patchwork_url: https://patchwork.ozlabs.org
|
|
163
166
|
|
|
164
167
|
If you want to adjust settings (or aliases) that affect just a single
|
|
165
168
|
project you can add a section that looks like [project_settings] or
|
|
@@ -263,9 +266,9 @@ Series-links: [id | version:id]...
|
|
|
263
266
|
|
|
264
267
|
Series-patchwork-url: url
|
|
265
268
|
This allows specifying the Patchwork URL for a branch. This overrides
|
|
266
|
-
both the setting files and the command-line argument.
|
|
267
|
-
include the protocol and web site, with no trailing slash,
|
|
268
|
-
'https://patchwork.ozlabs.org/project'
|
|
269
|
+
both the setting files ("patchwork_url") and the command-line argument.
|
|
270
|
+
The URL should include the protocol and web site, with no trailing slash,
|
|
271
|
+
for example 'https://patchwork.ozlabs.org/project'
|
|
269
272
|
|
|
270
273
|
Cover-letter:
|
|
271
274
|
Sets the cover letter contents for the series. The first line
|
|
@@ -295,7 +298,7 @@ Series-notes:
|
|
|
295
298
|
|
|
296
299
|
Commit-notes:
|
|
297
300
|
Similar, but for a single commit (patch). These notes will appear
|
|
298
|
-
immediately below the
|
|
301
|
+
immediately below the ``---`` cut in the patch file::
|
|
299
302
|
|
|
300
303
|
Commit-notes:
|
|
301
304
|
blah blah
|
|
@@ -365,7 +368,20 @@ Cover-changes: n
|
|
|
365
368
|
- This line will only appear in the cover letter
|
|
366
369
|
<blank line>
|
|
367
370
|
|
|
368
|
-
|
|
371
|
+
Commit-added-in: n
|
|
372
|
+
Add a change noting the version this commit was added in. This is
|
|
373
|
+
equivalent to::
|
|
374
|
+
|
|
375
|
+
Commit-changes: n
|
|
376
|
+
- New
|
|
377
|
+
|
|
378
|
+
Cover-changes: n
|
|
379
|
+
- <commit subject>
|
|
380
|
+
|
|
381
|
+
It is a convenient shorthand for suppressing the '(no changes in vN)'
|
|
382
|
+
message.
|
|
383
|
+
|
|
384
|
+
Patch-cc / Commit-cc: Their Name <email>
|
|
369
385
|
This copies a single patch to another email address. Note that the
|
|
370
386
|
Cc: used by git send-email is ignored by patman, but will be
|
|
371
387
|
interpreted by git send-email if you use it.
|
|
@@ -661,6 +677,282 @@ so to send them:
|
|
|
661
677
|
and it will create and send the version 2 series.
|
|
662
678
|
|
|
663
679
|
|
|
680
|
+
Series Management
|
|
681
|
+
-----------------
|
|
682
|
+
|
|
683
|
+
Sometimes you might have several series in flight at the same time. Each of
|
|
684
|
+
these receives comments and you want to create a new version of each series with
|
|
685
|
+
those comments addressed.
|
|
686
|
+
|
|
687
|
+
Patman provides a few subcommands which are helpful for managing series.
|
|
688
|
+
|
|
689
|
+
Series and branches
|
|
690
|
+
~~~~~~~~~~~~~~~~~~~
|
|
691
|
+
|
|
692
|
+
'patman series' works with the concept of a series. It maintains a local
|
|
693
|
+
database (.patman.db in your top-level git tree) and uses that to keep track of
|
|
694
|
+
series and patches.
|
|
695
|
+
|
|
696
|
+
Each series goes through muliple versions. Patman requires that the first
|
|
697
|
+
version of your series is in a branch without a numeric suffix. Branch names
|
|
698
|
+
like 'serial' and 'video' are OK, but 'part3' is not. This is because Patman
|
|
699
|
+
uses the number at the end of the branch name to indicate the version.
|
|
700
|
+
|
|
701
|
+
If your series name is 'video', then you can have a 'video' branch for version
|
|
702
|
+
1 of the series, 'video2' for version 2 and 'video3' for version 3. All three
|
|
703
|
+
branches are for the same series. Patman keeps track of these different
|
|
704
|
+
versions. It handles the branch naming automatically, but you need to be aware
|
|
705
|
+
of what it is doing.
|
|
706
|
+
|
|
707
|
+
You will have an easier time if the branch names you use with 'patman series'
|
|
708
|
+
are short, no more than 15 characters. This is the amount of columnar space in
|
|
709
|
+
listings. You can add a longer description as the series description. If you
|
|
710
|
+
are used to having very descriptive branch names, remember that patman lets you
|
|
711
|
+
add metadata into commit which is automatically removed before sending.
|
|
712
|
+
|
|
713
|
+
This documentation uses the term 'series' to mean all the versions of a series
|
|
714
|
+
and 'series/version' to mean a particular version of a series.
|
|
715
|
+
|
|
716
|
+
Updating commits
|
|
717
|
+
~~~~~~~~~~~~~~~~
|
|
718
|
+
|
|
719
|
+
Since Patman provides quite a bit of automation, it updates your commits in
|
|
720
|
+
some cases, effectively doing a rebase of a branch in order to change the tags
|
|
721
|
+
in the commits. It never makes code changes.
|
|
722
|
+
|
|
723
|
+
In extremis you can use 'git reflog' to revert something that Patman did.
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
Series subcommands
|
|
727
|
+
~~~~~~~~~~~~~~~~~~
|
|
728
|
+
|
|
729
|
+
Note that 'patman series ...' can be abbreviated as 'patman s' or 'patman ser'.
|
|
730
|
+
|
|
731
|
+
Here is a short overview of the available subcommands:
|
|
732
|
+
|
|
733
|
+
add
|
|
734
|
+
Add a new series. Use this on an existing branch to tell Patman about it.
|
|
735
|
+
|
|
736
|
+
archive (ar)
|
|
737
|
+
Archive a series when you have finished upstreaming it. Archived series
|
|
738
|
+
are not shown by most commands. This creates a dated tag for each
|
|
739
|
+
version of the series, pointing to the series branch, then deletes the
|
|
740
|
+
branches. It puts the tag names in the database so that it can
|
|
741
|
+
'unarchive' to restore things how they were.
|
|
742
|
+
|
|
743
|
+
unarchive (unar)
|
|
744
|
+
Unarchive a series when you decide you need to do something more with
|
|
745
|
+
it. The branches are restored and tags deleted.
|
|
746
|
+
|
|
747
|
+
autolink (au)
|
|
748
|
+
Search patchwork for the series link for your series, so Patman can
|
|
749
|
+
track the status
|
|
750
|
+
|
|
751
|
+
autolink-all
|
|
752
|
+
Same but for all series
|
|
753
|
+
|
|
754
|
+
inc
|
|
755
|
+
Increase the series number, effectively creating a new branch with the
|
|
756
|
+
next highest version number. The new branch is created based on the
|
|
757
|
+
existing branch. So if you use 'patman series inc' on branch 'video2'
|
|
758
|
+
it will create branch 'video3' and add v3 into its database
|
|
759
|
+
|
|
760
|
+
dec
|
|
761
|
+
Decrease the series number, thus deleting the current branch and
|
|
762
|
+
removing that version from the data. If you use this comment on branch
|
|
763
|
+
'video3' Patman will delete version 3 and branch 'video3'.
|
|
764
|
+
|
|
765
|
+
get-link
|
|
766
|
+
Shows the Patchwork link for a series/version
|
|
767
|
+
|
|
768
|
+
ls
|
|
769
|
+
Lists the series in the database
|
|
770
|
+
|
|
771
|
+
mark
|
|
772
|
+
Mark a series with 'Change-Id' tags so that Patman can track patches
|
|
773
|
+
even when the subject changes. Unmarked patches just use the subject to
|
|
774
|
+
decided which is which.
|
|
775
|
+
|
|
776
|
+
unmark
|
|
777
|
+
Remove 'Change-Id' tags from a series.
|
|
778
|
+
|
|
779
|
+
open (o)
|
|
780
|
+
Open a series in Patchwork using your web browser
|
|
781
|
+
|
|
782
|
+
patches
|
|
783
|
+
Show the patches in a particular series/version
|
|
784
|
+
|
|
785
|
+
progress (p)
|
|
786
|
+
Show upstream progress for your series, or for all series
|
|
787
|
+
|
|
788
|
+
rm
|
|
789
|
+
Remove a series entirely, including all versions
|
|
790
|
+
|
|
791
|
+
rm-version (rmv)
|
|
792
|
+
Remove a particular version of a series. This is similar to 'dec'
|
|
793
|
+
except that any version can be removed, not just the latest one.
|
|
794
|
+
|
|
795
|
+
scan
|
|
796
|
+
Scan the local branch and update the database with the set of patches
|
|
797
|
+
in that branch. This throws away the old patches.
|
|
798
|
+
|
|
799
|
+
send
|
|
800
|
+
Send a series out as patches. This is similar to 'patman send' except
|
|
801
|
+
that it can send any series, not just the current branch. It also
|
|
802
|
+
waits a little for patchwork to see the cover letter, so it can find
|
|
803
|
+
out the patchwork link for the series.
|
|
804
|
+
|
|
805
|
+
set-link
|
|
806
|
+
Sets the Patchwork link for a series-version manually.
|
|
807
|
+
|
|
808
|
+
status (st)
|
|
809
|
+
Run 'patman status' on a series. This is similar to 'patman status'
|
|
810
|
+
except that it can get status on any series, not just the current
|
|
811
|
+
branch
|
|
812
|
+
|
|
813
|
+
summary
|
|
814
|
+
Shows a quick summary of series with their status and description.
|
|
815
|
+
|
|
816
|
+
sync
|
|
817
|
+
Sync the status of a series with Pathwork, so that
|
|
818
|
+
'patman series progress' can show the right information.
|
|
819
|
+
|
|
820
|
+
sync-all
|
|
821
|
+
Sync the status of all series.
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
Patman series workflow
|
|
825
|
+
~~~~~~~~~~~~~~~~~~~~~~
|
|
826
|
+
|
|
827
|
+
Here is a run-through of how to incorporate 'patman series' into your workflow.
|
|
828
|
+
|
|
829
|
+
Firstly, set up your project::
|
|
830
|
+
|
|
831
|
+
patman patchwork set-project U-Boot
|
|
832
|
+
|
|
833
|
+
This just tells Patman to look on the Patchwork server for a project of that
|
|
834
|
+
name. Internally Patman stores the ID and URL 'link-name' for the project, so it
|
|
835
|
+
can access it.
|
|
836
|
+
|
|
837
|
+
If you need to use a different patchwork server, use the `--patchwork-url`
|
|
838
|
+
option or put the URL in your Patman-settings file.
|
|
839
|
+
|
|
840
|
+
Now create a branch. For our example we are going to send out a series related
|
|
841
|
+
to video so the branch will be called 'video'. The upstream remove is called
|
|
842
|
+
'us'::
|
|
843
|
+
|
|
844
|
+
git checkout -b video us/master
|
|
845
|
+
|
|
846
|
+
We now have a branch and so we can do some commits::
|
|
847
|
+
|
|
848
|
+
<edit files>
|
|
849
|
+
git add ...
|
|
850
|
+
<edit files>
|
|
851
|
+
git add -u
|
|
852
|
+
git commit ...
|
|
853
|
+
git commit ...
|
|
854
|
+
|
|
855
|
+
We now have a few commits in our 'video' branch. Let's tell patman about it::
|
|
856
|
+
|
|
857
|
+
patman series add
|
|
858
|
+
|
|
859
|
+
Like most commands, if no series is given (`patman series -s video add`) then
|
|
860
|
+
the current branch is assumed. Since the branch is called 'video' patman knows
|
|
861
|
+
that it is version one of the video series.
|
|
862
|
+
|
|
863
|
+
You'll likely get a warning that there is no cover letter. Let's add some tags
|
|
864
|
+
to the top commit::
|
|
865
|
+
|
|
866
|
+
Series-to: u-boot
|
|
867
|
+
Series-cc: ...
|
|
868
|
+
Cover-letter:
|
|
869
|
+
video: Improve syncing performance with cyclic
|
|
870
|
+
|
|
871
|
+
Trying again::
|
|
872
|
+
|
|
873
|
+
patman series add
|
|
874
|
+
|
|
875
|
+
You'll likely get a warning that the commits are unmarked. You can either let
|
|
876
|
+
patman add Change-Id values itself with the `-m` flag, or tell it not to worry
|
|
877
|
+
about it with `-M`. You must choose one or the other. Let's leave the commits
|
|
878
|
+
unmarked::
|
|
879
|
+
|
|
880
|
+
patman series add -M
|
|
881
|
+
|
|
882
|
+
Congratulations, you've now got a patman database!
|
|
883
|
+
|
|
884
|
+
Now let's send out the series. We will add tags to the top commit.
|
|
885
|
+
|
|
886
|
+
To send it::
|
|
887
|
+
|
|
888
|
+
patman series send
|
|
889
|
+
|
|
890
|
+
You should send 'git send-email' start up and you can confirm the sending of
|
|
891
|
+
each email.
|
|
892
|
+
|
|
893
|
+
After that, patman waits a bit to see if it can find your new series appearing
|
|
894
|
+
on Patchwork. With a bit of luck this will only take 20 seconds or so. Then your
|
|
895
|
+
series is linked.
|
|
896
|
+
|
|
897
|
+
To gather tags (Reviewed-by ...) for your series from patchwork::
|
|
898
|
+
|
|
899
|
+
patman series gather
|
|
900
|
+
|
|
901
|
+
Now you can check your progress::
|
|
902
|
+
|
|
903
|
+
patman series progress
|
|
904
|
+
|
|
905
|
+
Later on you get some comments, or perhaps you just decide to make a change on
|
|
906
|
+
your own. You have several options.
|
|
907
|
+
|
|
908
|
+
The first option is that you can just create a new branch::
|
|
909
|
+
|
|
910
|
+
git checkout -b video2 video
|
|
911
|
+
|
|
912
|
+
then you can add this 'v2' series to Patman with::
|
|
913
|
+
|
|
914
|
+
patman series add
|
|
915
|
+
|
|
916
|
+
The second option is to get patman to create the new 'video2' branch in one
|
|
917
|
+
step::
|
|
918
|
+
|
|
919
|
+
patman inc
|
|
920
|
+
|
|
921
|
+
The third option is to collect some tags using the 'patman status' command and
|
|
922
|
+
put them in a new branch::
|
|
923
|
+
|
|
924
|
+
patman status -d video2
|
|
925
|
+
|
|
926
|
+
One day the fourth option will be to ask patman to collect tags as part of the
|
|
927
|
+
'patman inc' command.
|
|
928
|
+
|
|
929
|
+
Again, you do your edits, perhaps adding/removing patches, rebasing on -master
|
|
930
|
+
and so on. Then, send your v2::
|
|
931
|
+
|
|
932
|
+
patman series send
|
|
933
|
+
|
|
934
|
+
Let's say the patches are accepted. You can use::
|
|
935
|
+
|
|
936
|
+
patch series gather
|
|
937
|
+
patch series progress
|
|
938
|
+
|
|
939
|
+
to check, or::
|
|
940
|
+
|
|
941
|
+
patman series status -cC
|
|
942
|
+
|
|
943
|
+
to see comments. You can now archive the series::
|
|
944
|
+
|
|
945
|
+
patman series archive
|
|
946
|
+
|
|
947
|
+
At this point you have the basics. Some of the subcommands useful options, so
|
|
948
|
+
be sure to check out the help.
|
|
949
|
+
|
|
950
|
+
Here is a sample 'progress' view:
|
|
951
|
+
|
|
952
|
+
.. image:: pics/patman.jpg
|
|
953
|
+
:width: 800
|
|
954
|
+
:alt: Patman showing the progress view
|
|
955
|
+
|
|
664
956
|
General points
|
|
665
957
|
--------------
|
|
666
958
|
|