this: patman: Update documentation to match new usage
PATCH v2 1/2 this: patman: Update documentation to match new usage
With the subcommands some of the documentation examples are no-longer correct. Fix all of them, so it is consistent.
---
(no changes since v1)
tools/patman/README | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
tools/patman/README +7 -7
@@ -136,17 +136,17 @@ How to run it First do a dry run: -$ ./tools/patman/patman -n +$ ./tools/patman/patman send -n If it can't detect the upstream branch, try telling it how many patches there are in your series: -$ ./tools/patman/patman -n -c5 +$ ./tools/patman/patman -c5 send -n This will create patch files in your current directory and tell you who it is thinking of sending them to. Take a look at the patch files. -$ ./tools/patman/patman -n -c5 -s1 +$ ./tools/patman/patman -c5 -s1 send -n Similar to the above, but skip the first commit and take the next 5. This is useful if your top commit is for setting up testing.
@@ -433,12 +433,12 @@ but that you don't want to submit because there is an existing patch for it on the list. So you can tell patman to create and check some patches (skipping the first patch) with: - patman -s1 -n + patman -s1 send -n If you want to do all of them including the work-in-progress one, then (if you are tracking an upstream branch): - patman -n + patman send -n Let's say that patman reports an error in the second patch. Then:
@@ -450,7 +450,7 @@ Let's say that patman reports an error in the second patch. Then: Now you have an updated patch series. To check it: - patman -s1 -n + patman -s1 send -n Let's say it is now clean and you want to send it. Now you need to set up the destination. So amend the top commit with:
@@ -485,7 +485,7 @@ mmc and sparc, and the last one to sandbox. Now to send the patches, take off the -n flag: - patman -s1 + patman -s1 send The patches will be created, shown in your editor, and then sent along with the cover letter. Note that patman's tags are automatically removed so that
Signature · 1 line
2.30.0.280.ga3ce27912f-goog
PATCH v2 1/2 this: patman: Update documentation to match new usage
With the subcommands some of the documentation examples are no-longer correct. Fix all of them, so it is consistent.
---
(no changes since v1)
tools/patman/README | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
Applied to u-boot-dm/next, thanks!
PATCH v2 2/2 patman: Quieten down the alias checking
In reply to Simon GlassWhen a tag is used in a patch subject (e.g. "tag: rest of message") and it cannot be found as an alias, patman currently reports a fatal error, unless -t is provided, in which case it reports a warning.
Experience suggest that the fatal error is not very useful. Instead, default to reporting a warning, with -t tell patman to ignore it altogether.
---
Changes in v2:
- Ignore bad tags when not processing them
tools/patman/func_test.py | 2 +- tools/patman/gitutil.py | 45 +++++++++++++++++---------------------- tools/patman/main.py | 6 +++++- tools/patman/series.py | 10 ++++----- 4 files changed, 31 insertions(+), 32 deletions(-)
tools/patman/func_test.py +1 -1
@@ -186,7 +186,7 @@ class TestFunctional(unittest.TestCase): - Commit-notes """ process_tags = True - ignore_bad_tags = True + ignore_bad_tags = False stefan = b'Stefan Br\xc3\xbcns <[email protected]>'.decode('utf-8') rick = 'Richard III <[email protected]>' mel = b'Lord M\xc3\xablchett <[email protected]>'.decode('utf-8')
tools/patman/gitutil.py +20 -25
130 lines not on this page · raw message
tools/patman/main.py +5 -1
@@ -68,7 +68,8 @@ send.add_argument('-n', '--dry-run', action='store_true', dest='dry_run', send.add_argument('-r', '--in-reply-to', type=str, action='store', help="Message ID that this series is in reply to") send.add_argument('-t', '--ignore-bad-tags', action='store_true', - default=False, help='Ignore bad tags / aliases') + default=False, + help='Ignore bad tags / aliases (default=warn)') send.add_argument('-T', '--thread', action='store_true', dest='thread', default=False, help='Create patches as a single thread') send.add_argument('--cc-cmd', dest='cc_cmd', type=str, action='store',
@@ -176,6 +177,9 @@ elif args.cmd == 'send': command.Run(pager, fname) else: + # If we are not processing tags, no need to warning about bad ones + if not args.process_tags: + args.ignore_bad_tags = True control.send(args) # Check status of patches in patchwork
tools/patman/series.py +5 -5
@@ -234,7 +234,7 @@ class Series(dict): str = 'Change log exists, but no version is set' print(col.Color(col.RED, str)) - def MakeCcFile(self, process_tags, cover_fname, raise_on_error, + def MakeCcFile(self, process_tags, cover_fname, warn_on_error, add_maintainers, limit): """Make a cc file for us to use for per-commit Cc automation
@@ -243,8 +243,8 @@ class Series(dict): Args: process_tags: Process tags as if they were aliases cover_fname: If non-None the name of the cover letter. - raise_on_error: True to raise an error when an alias fails to match, - False to just print a message. + warn_on_error: True to print a warning when an alias fails to match, + False to ignore it. add_maintainers: Either: True/False to call the get_maintainers to CC maintainers List of maintainers to include (for testing)
@@ -261,9 +261,9 @@ class Series(dict): cc = [] if process_tags: cc += gitutil.BuildEmailList(commit.tags, - raise_on_error=raise_on_error) + warn_on_error=warn_on_error) cc += gitutil.BuildEmailList(commit.cc_list, - raise_on_error=raise_on_error) + warn_on_error=warn_on_error) if type(add_maintainers) == type(cc): cc += add_maintainers elif add_maintainers:
Signature · 1 line
2.30.0.280.ga3ce27912f-goog
PATCH v2 2/2 patman: Quieten down the alias checking
When a tag is used in a patch subject (e.g. "tag: rest of message") and it cannot be found as an alias, patman currently reports a fatal error, unless -t is provided, in which case it reports a warning.
Experience suggest that the fatal error is not very useful. Instead, default to reporting a warning, with -t tell patman to ignore it altogether.
---
Changes in v2:
- Ignore bad tags when not processing them
tools/patman/func_test.py | 2 +- tools/patman/gitutil.py | 45 +++++++++++++++++---------------------- tools/patman/main.py | 6 +++++- tools/patman/series.py | 10 ++++----- 4 files changed, 31 insertions(+), 32 deletions(-)
Applied to u-boot-dm/next, thanks!