Patchwork [U-Boot,6/8] patman: Add -a option to refrain from test-applying the patches

login
register
mail settings
Submitter Simon Glass
Date March 21, 2013, 2:42 a.m.
Message ID <1363833781-14557-7-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/229535/
State Superseded, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - March 21, 2013, 2:42 a.m.
Especially with the Linux kernel, it takes a long time (a minute or more)
to test-apply the patches, so patman becomes significantly less useful.
The only real problem that is found with this apply step is trailing spaces.
Provide a -a option to skip this step, for those working with clean patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 tools/patman/patman.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Doug Anderson - March 21, 2013, 5:12 p.m.
Simon,

On Wed, Mar 20, 2013 at 7:42 PM, Simon Glass <sjg@chromium.org> wrote:
> Especially with the Linux kernel, it takes a long time (a minute or more)
> to test-apply the patches, so patman becomes significantly less useful.
> The only real problem that is found with this apply step is trailing spaces.
> Provide a -a option to skip this step, for those working with clean patches.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  tools/patman/patman.py | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Reviewed-by: Doug Anderson <dianders@chromium.org>

Patch

diff --git a/tools/patman/patman.py b/tools/patman/patman.py
index 5768f56..b92a393 100755
--- a/tools/patman/patman.py
+++ b/tools/patman/patman.py
@@ -41,6 +41,9 @@  import test
 
 
 parser = OptionParser()
+parser.add_option('-a', '--no-apply', action='store_false',
+                  dest='apply_patches', default=True,
+                  help="Don't test-apply patches with git am")
 parser.add_option('-H', '--full-help', action='store_true', dest='full_help',
        default=False, help='Display the README file')
 parser.add_option('-c', '--count', dest='count', type='int',
@@ -157,9 +160,10 @@  else:
         ok = checkpatch.CheckPatches(options.verbose, args)
     else:
         ok = True
-    if not gitutil.ApplyPatches(options.verbose, args,
-            options.count + options.start):
-        ok = False
+    if options.apply_patches:
+        if not gitutil.ApplyPatches(options.verbose, args,
+                                    options.count + options.start):
+            ok = False
 
     cc_file = series.MakeCcFile(options.process_tags, cover_fname,
                                 options.ignore_bad_tags)