
Hi Doug,
On Fri, Nov 30, 2012 at 4:29 PM, Doug Anderson dianders@chromium.org wrote:
There are cases that we want to support different settings (or maybe even different aliases) for different projects. Add support for this by:
- Adding detection for two big projects: U-Boot and Linux.
- Adding default settings for Linux (U-Boot is already good with the standard patman defaults).
- Extend the new "settings" feature in .patman to specify per-project settings.
Signed-off-by: Doug Anderson dianders@chromium.org
tools/patman/README | 13 ++++ tools/patman/patman.py | 9 +++- tools/patman/project.py | 43 +++++++++++++ tools/patman/settings.py | 147 +++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 208 insertions(+), 4 deletions(-) create mode 100644 tools/patman/project.py
diff --git a/tools/patman/README b/tools/patman/README index 6ca5b5b..d294f3d 100644 --- a/tools/patman/README +++ b/tools/patman/README @@ -114,6 +114,19 @@ verbose: True <<<
+If you want to adjust settings (or aliases) that affect just a single +project you can add a section that looks like [project_settings] or +[project_alias]. If you want to use tags for your linux work, you could +do:
+>>>
+[linux_settings] +process_tags: True
+<<<
How to run it
diff --git a/tools/patman/patman.py b/tools/patman/patman.py index b327c67..54a252e 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -34,6 +34,7 @@ import checkpatch import command import gitutil import patchstream +import project import settings import terminal import test @@ -59,6 +60,9 @@ parser.add_option('--cc-cmd', dest='cc_cmd', type='string', action='store', default=None, help='Output cc list for patch file (used by git)') parser.add_option('--no-tags', action='store_false', dest='process_tags', default=True, help="Don't process subject tags as aliaes") +parser.add_option('--project', default=project.DetectProject(),
help="Project name; affects default option values and "
"aliases [default: %default]")
Can you please add a short option also - perhaps -p?
[snip]
Regards, Simon