Patchwork [8,of,8] test-flagprocessor: remove unnecessary greps

login
register
mail settings
Submitter Jun Wu
Date April 7, 2017, 2:08 a.m.
Message ID <fd2bcb9a6182d5abaa06.1491530896@x1c>
Download mbox | patch
Permalink /patch/19988/
State Accepted
Headers show

Comments

Jun Wu - April 7, 2017, 2:08 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1491530511 25200
#      Thu Apr 06 19:01:51 2017 -0700
# Node ID fd2bcb9a6182d5abaa06cf6b3fd8a19ab0223750
# Parent  be7f687c98afa3e03ffee53b95024b74c2585485
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r fd2bcb9a6182
test-flagprocessor: remove unnecessary greps

The "2>&1 | egrep ..." code is used for removing uninteresting parts from
tracebacks. Now the test does not dump tracebacks, they can be removed.
Ryan McElroy - April 7, 2017, 1:40 p.m.
On 4/7/17 3:08 AM, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1491530511 25200
> #      Thu Apr 06 19:01:51 2017 -0700
> # Node ID fd2bcb9a6182d5abaa06cf6b3fd8a19ab0223750
> # Parent  be7f687c98afa3e03ffee53b95024b74c2585485
> test-flagprocessor: remove unnecessary greps

I have reviewed this series and it looks good to me. I'll mark it as 
pre-reviewed. I will have one or two non-blocking comments coming in on 
the series.

This series fixes another set of nasty raw vs processed issues in core.

Thanks for taking the time to create an easy to follow "story" of the 
patches here once again... creating the test in a compact form and 
fixing issues one by one in easy-to-review manner. I really appreciate 
the effort you put in to make reviewable patches -- I know it's not easy 
in some of these cases.

>
> The "2>&1 | egrep ..." code is used for removing uninteresting parts from
> tracebacks. Now the test does not dump tracebacks, they can be removed.
>
> diff --git a/tests/test-flagprocessor.t b/tests/test-flagprocessor.t
> --- a/tests/test-flagprocessor.t
> +++ b/tests/test-flagprocessor.t
> @@ -188,5 +188,5 @@
>     4 changesets found
>     $ hg --config extensions.strip= strip -r 2 --no-backup --force -q
> -  $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*|  )'
> +  $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64
>     5 branching
>      base64 |  2 +-
> @@ -214,7 +214,6 @@
>     
>   
> -  $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q 2>&1 | egrep -v '^(\*\*|  )'
> -  [1]
> -  $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*|  )'
> +  $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q
> +  $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64
>     5 branching
>      base64 |  2 +-
>

Patch

diff --git a/tests/test-flagprocessor.t b/tests/test-flagprocessor.t
--- a/tests/test-flagprocessor.t
+++ b/tests/test-flagprocessor.t
@@ -188,5 +188,5 @@ 
   4 changesets found
   $ hg --config extensions.strip= strip -r 2 --no-backup --force -q
-  $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*|  )'
+  $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64
   5 branching
    base64 |  2 +-
@@ -214,7 +214,6 @@ 
   
 
-  $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q 2>&1 | egrep -v '^(\*\*|  )'
-  [1]
-  $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*|  )'
+  $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q
+  $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64
   5 branching
    base64 |  2 +-