public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] patman: force git log commands to not use color
@ 2012-10-15  5:47 Albert ARIBAUD
  2012-10-15 17:20 ` Simon Glass
  2012-10-15 19:55 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
  0 siblings, 2 replies; 6+ messages in thread
From: Albert ARIBAUD @ 2012-10-15  5:47 UTC (permalink / raw)
  To: u-boot

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 <albert.u.boot@aribaud.net>
---
 tools/patman/gitutil.py     |    2 +-
 tools/patman/patchstream.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 59eca99..72d37a0 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -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)
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 0503bac..4314537 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -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)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] patman: force git log commands to not use color
  2012-10-15  5:47 [U-Boot] [PATCH] patman: force git log commands to not use color Albert ARIBAUD
@ 2012-10-15 17:20 ` Simon Glass
  2012-10-15 19:56   ` Albert ARIBAUD
  2012-10-15 19:55 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Glass @ 2012-10-15 17:20 UTC (permalink / raw)
  To: u-boot

Hi Albert,

On Sun, Oct 14, 2012 at 10:47 PM, Albert ARIBAUD
<albert.u.boot@aribaud.net> wrote:
> 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 <albert.u.boot@aribaud.net>
> ---
>  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.

>
> diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
> index 59eca99..72d37a0 100644
> --- a/tools/patman/gitutil.py
> +++ b/tools/patman/gitutil.py
> @@ -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)
> diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
> index 0503bac..4314537 100644
> --- a/tools/patman/patchstream.py
> +++ b/tools/patman/patchstream.py
> @@ -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?

>      stdout = command.RunPipe(pipe, capture=True)
>      series = Series()
>      ps = PatchStream(series, is_log=True)
> --
> 1.7.9.5
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2] patman: force git log commands to not use color
  2012-10-15  5:47 [U-Boot] [PATCH] patman: force git log commands to not use color Albert ARIBAUD
  2012-10-15 17:20 ` Simon Glass
@ 2012-10-15 19:55 ` Albert ARIBAUD
  2012-10-15 20:02   ` Simon Glass
  2012-10-20 17:42   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 2 replies; 6+ messages in thread
From: Albert ARIBAUD @ 2012-10-15 19:55 UTC (permalink / raw)
  To: u-boot

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 <albert.u.boot@aribaud.net>
---
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(-)

diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 59eca99..72d37a0 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -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)
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 0503bac..ad280cc 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] patman: force git log commands to not use color
  2012-10-15 17:20 ` Simon Glass
@ 2012-10-15 19:56   ` Albert ARIBAUD
  0 siblings, 0 replies; 6+ messages in thread
From: Albert ARIBAUD @ 2012-10-15 19:56 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Mon, 15 Oct 2012 10:20:59 -0700, Simon Glass <sjg@chromium.org>
wrote:

> Hi Albert,
> 
> On Sun, Oct 14, 2012 at 10:47 PM, Albert ARIBAUD
> <albert.u.boot@aribaud.net> wrote:
> > 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 <albert.u.boot@aribaud.net>
> > ---
> >  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.
> 
> >
> > diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
> > index 59eca99..72d37a0 100644
> > --- a/tools/patman/gitutil.py
> > +++ b/tools/patman/gitutil.py
> > @@ -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)
> > diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
> > index 0503bac..4314537 100644
> > --- a/tools/patman/patchstream.py
> > +++ b/tools/patman/patchstream.py
> > @@ -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. :)

> >      stdout = command.RunPipe(pipe, capture=True)
> >      series = Series()
> >      ps = PatchStream(series, is_log=True)
> > --
> > 1.7.9.5
> >
> 
> Regards,
> Simon

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2] patman: force git log commands to not use color
  2012-10-15 19:55 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
@ 2012-10-15 20:02   ` Simon Glass
  2012-10-20 17:42   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2012-10-15 20:02 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 15, 2012 at 12:55 PM, Albert ARIBAUD
<albert.u.boot@aribaud.net> wrote:
> 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 <albert.u.boot@aribaud.net>

Acked-by: Simon Glass <sjg@chromium.org>

Thanks for the fix.

> ---
> 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(-)
>
> diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
> index 59eca99..72d37a0 100644
> --- a/tools/patman/gitutil.py
> +++ b/tools/patman/gitutil.py
> @@ -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)
> diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
> index 0503bac..ad280cc 100644
> --- a/tools/patman/patchstream.py
> +++ b/tools/patman/patchstream.py
> @@ -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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [U-Boot, v2] patman: force git log commands to not use color
  2012-10-15 19:55 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
  2012-10-15 20:02   ` Simon Glass
@ 2012-10-20 17:42   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2012-10-20 17:42 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 15, 2012 at 09:55:50AM -0000, Albert ARIBAUD wrote:

> 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 <albert.u.boot@aribaud.net>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-20 17:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15  5:47 [U-Boot] [PATCH] patman: force git log commands to not use color Albert ARIBAUD
2012-10-15 17:20 ` Simon Glass
2012-10-15 19:56   ` Albert ARIBAUD
2012-10-15 19:55 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
2012-10-15 20:02   ` Simon Glass
2012-10-20 17:42   ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox