patman: force git log commands to not use color
PATCH 1/1 patman: force git log commands to not use color
Colored logs confuse patman when analyzing logs.
Add --no-color option in git log commands in case
the default config has color.
--- tools/patman/gitutil.py | 2 +- tools/patman/patchstream.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/patman/gitutil.py +1 -1
@@ -38,7 +38,7 @@ def CountCommitsToBranch(): Return: Number of patches that exist on top of the branch """ - pipe = [['git', 'log', '--oneline', '@{upstream}..'], + pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'], ['wc', '-l']] stdout = command.RunPipe(pipe, capture=True, oneline=True) patch_count = int(stdout)
tools/patman/patchstream.py +1 -1
@@ -344,7 +344,7 @@ def GetMetaData(start, count): start: Commit to start from: 0=HEAD, 1=next one, etc. count: Number of commits to list """ - pipe = [['git', 'log', '--reverse', 'HEAD~%d' % start, '-n%d' % count]] + pipe = [['git', 'log', '--no-color', '--reverse', 'HEAD~%d' % start, '-n%d' % count]] stdout = command.RunPipe(pipe, capture=True) series = Series() ps = PatchStream(series, is_log=True)
Signature · 1 line
1.7.9.5
PATCH 1/1 patman: force git log commands to not use color
Hi Albert,
Quoted 9 lines · Albert ARIBAUD
Colored logs confuse patman when analyzing logs.
Add --no-color option in git log commands in case
the default config has color.Signed-off-by Albert ARIBAUD <[email protected]>--- tools/patman/gitutil.py | 2 +- tools/patman/patchstream.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Thanks for the patch, it's good to find this problem.
Quoted 19 lines
tools/patman/gitutil.py +1
-1@@ -38,7 +38,7 @@ def CountCommitsToBranch(): Return: Number of patches that exist on top of the branch """ - pipe = [['git', 'log', '--oneline', '@{upstream}..'], + pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'], ['wc', '-l']] stdout = command.RunPipe(pipe, capture=True, oneline=True) patch_count = int(stdout)tools/patman/patchstream.py +0
-0
tools/patman/patchstream.py def GetMetaData(start, count): · line 347
Quoted 5 lines
tools/patman/patchstream.py +1
-1@@ -344,7 +344,7 @@ def GetMetaData(start, count): start: Commit to start from: 0=HEAD, 1=next one, etc. count: Number of commits to list """ - pipe = [['git', 'log', '--reverse', 'HEAD~%d' % start, '-n%d' % count]] + pipe = [['git', 'log', '--no-color', '--reverse', 'HEAD~%d' % start, '-n%d' % count]]
The functionality is good, but can I ask for 80 columns on this one please?
Quoted 6 lines
tools/patman/patchstream.py +0
-1stdout = command.RunPipe(pipe, capture=True) series = Series() ps = PatchStream(series, is_log=True) --1.7.9.5
Regards,
Simon
PATCH 1/1 patman: force git log commands to not use color
Hi Simon,
Quoted 34 lines · Simon Glass
Hi Albert,
Quoted 9 lines · Albert ARIBAUD
Colored logs confuse patman when analyzing logs.
Add --no-color option in git log commands in case
the default config has color.Signed-off-by Albert ARIBAUD <[email protected]>--- tools/patman/gitutil.py | 2 +- tools/patman/patchstream.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Thanks for the patch, it's good to find this problem.
Quoted 18 lines
tools/patman/gitutil.py +1
-1@@ -38,7 +38,7 @@ def CountCommitsToBranch(): Return: Number of patches that exist on top of the branch """ - pipe = [['git', 'log', '--oneline', '@{upstream}..'], + pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'], ['wc', '-l']] stdout = command.RunPipe(pipe, capture=True, oneline=True) patch_count = int(stdout)tools/patman/patchstream.py +0
-0
Quoted 8 lines
tools/patman/patchstream.py def GetMetaData(start, count): · line 347
Quoted 6 lines
tools/patman/patchstream.py +1
-1@@ -344,7 +344,7 @@ def GetMetaData(start, count): start: Commit to start from: 0=HEAD, 1=next one, etc. count: Number of commits to list """ - pipe = [['git', 'log', '--reverse', 'HEAD~%d' % start, '-n%d' % count]] + pipe = [['git', 'log', '--no-color', '--reverse', 'HEAD~%d' % start, '-n%d' % count]]The functionality is good, but can I ask for 80 columns on this one please?
Done. :)
Quoted 9 lines
Quoted 6 lines
tools/patman/patchstream.py +0
-1stdout = command.RunPipe(pipe, capture=True) series = Series() ps = PatchStream(series, is_log=True) --1.7.9.5
Regards,
Simon
Amicalement,
Signature · 1 line
Albert.
PATCH v2 1/1 patman: force git log commands to not use color
In reply to Albert ARIBAUDColored logs confuse patman when analyzing logs.
Add --no-color option in git log commands in case
the default config has color.
---
Changes in v2:
- fixed line longer than 80 characters
tools/patman/gitutil.py | 2 +- tools/patman/patchstream.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
tools/patman/gitutil.py +1 -1
@@ -38,7 +38,7 @@ def CountCommitsToBranch(): Return: Number of patches that exist on top of the branch """ - pipe = [['git', 'log', '--oneline', '@{upstream}..'], + pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'], ['wc', '-l']] stdout = command.RunPipe(pipe, capture=True, oneline=True) patch_count = int(stdout)
tools/patman/patchstream.py +2 -1
@@ -344,7 +344,8 @@ def GetMetaData(start, count): start: Commit to start from: 0=HEAD, 1=next one, etc. count: Number of commits to list """ - pipe = [['git', 'log', '--reverse', 'HEAD~%d' % start, '-n%d' % count]] + pipe = [['git', 'log', '--no-color', '--reverse', 'HEAD~%d' % start, + '-n%d' % count]] stdout = command.RunPipe(pipe, capture=True) series = Series() ps = PatchStream(series, is_log=True)
Signature · 1 line
1.7.9.5
PATCH v2 1/1 patman: force git log commands to not use color
Quoted 5 lines · Albert ARIBAUD
Colored logs confuse patman when analyzing logs.
Add --no-color option in git log commands in case
the default config has color.Signed-off-by Albert ARIBAUD <[email protected]>
Thanks for the fix.
Quoted 38 lines
---
Changes in v2:
- fixed line longer than 80 characterstools/patman/gitutil.py | 2 +- tools/patman/patchstream.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)tools/patman/gitutil.py +1
-1@@ -38,7 +38,7 @@ def CountCommitsToBranch(): Return: Number of patches that exist on top of the branch """ - pipe = [['git', 'log', '--oneline', '@{upstream}..'], + pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'], ['wc', '-l']] stdout = command.RunPipe(pipe, capture=True, oneline=True) patch_count = int(stdout)tools/patman/patchstream.py +2
-2@@ -344,7 +344,8 @@ def GetMetaData(start, count): start: Commit to start from: 0=HEAD, 1=next one, etc. count: Number of commits to list """ - pipe = [['git', 'log', '--reverse', 'HEAD~%d' % start, '-n%d' % count]] + pipe = [['git', 'log', '--no-color', '--reverse', 'HEAD~%d' % start, + '-n%d' % count]] stdout = command.RunPipe(pipe, capture=True) series = Series() ps = PatchStream(series, is_log=True) --1.7.9.5
PATCH v2 1/1 patman: force git log commands to not use color
In reply to Albert ARIBAUDQuoted 6 lines · Albert ARIBAUD
Colored logs confuse patman when analyzing logs. Add --no-color option in git log commands in case the default config has color.
Signed-off-by Albert ARIBAUD <[email protected]>Acked-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121020/807e675d/attachment.pgp>