From: Simon Glass <simon.glass@canonical.com> Free up -u for a future upstream option by renaming the flag that uses the first commit's subject as the series description. Signed-off-by: Simon Glass <simon.glass@canonical.com> --- tools/patman/cmdline.py | 2 +- tools/patman/control.py | 2 +- tools/patman/test_cseries.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/patman/cmdline.py b/tools/patman/cmdline.py index 8df9966ec6d..090d9845ec1 100644 --- a/tools/patman/cmdline.py +++ b/tools/patman/cmdline.py @@ -237,7 +237,7 @@ def add_series_subparser(subparsers): add.add_argument('-D', '--desc', help='Series description / cover-letter title') add.add_argument( - '-u', '--use-commit', action='store_true', + '-1', '--use-first-commit', action='store_true', help="Use the first commit's subject as series description if needed") add.add_argument( '-f', '--force-version', action='store_true', diff --git a/tools/patman/control.py b/tools/patman/control.py index c8d7405f7e8..c65fd3d5f1f 100644 --- a/tools/patman/control.py +++ b/tools/patman/control.py @@ -151,7 +151,7 @@ def do_series(args, test_db=None, pwork=None, cser=None): if args.subcmd == 'add': cser.add(args.series, args.desc, mark=args.mark, allow_unmarked=args.allow_unmarked, end=args.upstream, - use_commit=args.use_commit, dry_run=args.dry_run) + use_commit=args.use_first_commit, dry_run=args.dry_run) elif args.subcmd == 'archive': cser.archive(args.series) elif args.subcmd == 'autolink': diff --git a/tools/patman/test_cseries.py b/tools/patman/test_cseries.py index 2a31815932c..083727889f8 100644 --- a/tools/patman/test_cseries.py +++ b/tools/patman/test_cseries.py @@ -455,7 +455,7 @@ class TestCseries(unittest.TestCase, TestCommon): str(exc.exception)) with terminal.capture() as (out, _): - self.run_args('series', '-s', 'first', 'add', '--use-commit', + self.run_args('series', '-s', 'first', 'add', '--use-first-commit', '--allow-unmarked', pwork=True) lines = out.getvalue().splitlines() self.assertEqual( @@ -799,7 +799,7 @@ Tested-by: Mary Smith <msmith@wibble.com> # yak self.make_git_tree() args = Namespace(subcmd='add', desc='my-description', series='first', mark=False, allow_unmarked=True, upstream=None, - use_commit=False, dry_run=False) + use_first_commit=False, dry_run=False) with terminal.capture() as (out, _): control.do_series(args, test_db=self.tmpdir, pwork=True) @@ -847,7 +847,7 @@ Tested-by: Mary Smith <msmith@wibble.com> # yak force=True) args = Namespace(subcmd='add', series=None, mark=False, allow_unmarked=True, upstream=None, dry_run=False, - desc=None, use_commit=False) + desc=None, use_first_commit=False) with terminal.capture(): control.do_series(args, test_db=self.tmpdir, pwork=True) -- 2.43.0