]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
patman: Add a -m option to avoid copying the maintainers
authorSimon Glass <sjg@chromium.org>
Mon, 15 Sep 2014 02:23:17 +0000 (20:23 -0600)
committerSimon Glass <sjg@chromium.org>
Sun, 21 Sep 2014 18:03:07 +0000 (12:03 -0600)
The get_maintainers script is a useful default, but sometimes is copies
too many people, or takes a long time to run.

Add an option to disable it and update the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/README
tools/patman/patman.py
tools/patman/series.py

index 5fb508b80df10d3b11d95eea95a141ce3d0ef578..e466886ed2428416824e40f8d0faa529248ff4e4 100644 (file)
@@ -27,8 +27,8 @@ Series-to: fred.blogs@napier.co.nz
 
 in one of your commits, the series will be sent there.
 
-In Linux this will also call get_maintainer.pl on each of your
-patches automatically.
+In Linux and U-Boot this will also call get_maintainer.pl on each of your
+patches automatically (unless you use -m to disable this).
 
 
 How to use this tool
index 2ab6b351d690fc8d8a12bcfd10a27f8f262144ef..6c6473e462f044983d6616927c86c87170bd4ea6 100755 (executable)
@@ -32,6 +32,9 @@ parser.add_option('-c', '--count', dest='count', type='int',
 parser.add_option('-i', '--ignore-errors', action='store_true',
        dest='ignore_errors', default=False,
        help='Send patches email even if patch errors are found')
+parser.add_option('-m', '--no-maintainers', action='store_false',
+       dest='add_maintainers', default=True,
+       help="Don't cc the file maintainers automatically")
 parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run',
        default=False, help="Do a dry run (create but don't email patches)")
 parser.add_option('-p', '--project', default=project.DetectProject(),
@@ -142,7 +145,8 @@ else:
         ok = True
 
     cc_file = series.MakeCcFile(options.process_tags, cover_fname,
-                                not options.ignore_bad_tags)
+                                not options.ignore_bad_tags,
+                                options.add_maintainers)
 
     # Email the patches out (giving the user time to check / cancel)
     cmd = ''
index 88c0d877d400bc77035e010dab85b00c78eda6c0..b67f870b7e21518fa51e97040470658979094b5b 100644 (file)
@@ -201,7 +201,8 @@ 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, raise_on_error,
+                   add_maintainers):
         """Make a cc file for us to use for per-commit Cc automation
 
         Also stores in self._generated_cc to make ShowActions() faster.
@@ -211,6 +212,7 @@ class Series(dict):
             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.
+            add_maintainers: Call the get_maintainers to CC maintainers
         Return:
             Filename of temp file created
         """
@@ -225,7 +227,8 @@ class Series(dict):
                                                raise_on_error=raise_on_error)
             list += gitutil.BuildEmailList(commit.cc_list,
                                            raise_on_error=raise_on_error)
-            list += get_maintainer.GetMaintainer(commit.patch)
+           if add_maintainers:
+                list += get_maintainer.GetMaintainer(commit.patch)
             all_ccs += list
             print >>fd, commit.patch, ', '.join(list)
             self._generated_cc[commit.patch] = list