Patchwork [2,of,2] tests: svn output may or may not include blank lines

login
register
mail settings
Submitter Danek Duvall
Date March 15, 2016, 9:02 p.m.
Message ID <99c113c701ef57c5b316.1458075764@smelly.us.oracle.com>
Download mbox | patch
Permalink /patch/13900/
State Superseded
Headers show

Comments

Danek Duvall - March 15, 2016, 9:02 p.m.
# HG changeset patch
# User Danek Duvall <danek.duvall@oracle.com>
# Date 1458075645 25200
#      Tue Mar 15 14:00:45 2016 -0700
# Node ID 99c113c701ef57c5b3165f35071bbb5517372683
# Parent  0bb0e0813edcb4cdda18c5d950fd0df8d90b119f
tests: svn output may or may not include blank lines

Older versions of subversion include some blank lines in the output of the
import and copy subcommands, which have gone away in newer versions.  Allow
for both by enhancing the output filter to remove blank lines.
Augie Fackler - March 16, 2016, 4:54 p.m.
On Tue, Mar 15, 2016 at 02:02:44PM -0700, danek.duvall@oracle.com wrote:
> # HG changeset patch
> # User Danek Duvall <danek.duvall@oracle.com>
> # Date 1458075645 25200
> #      Tue Mar 15 14:00:45 2016 -0700
> # Node ID 99c113c701ef57c5b3165f35071bbb5517372683
> # Parent  0bb0e0813edcb4cdda18c5d950fd0df8d90b119f
> tests: svn output may or may not include blank lines

foozy fixed this as dfd5a6830, which is a slightly different but
equally valid approach. Thanks!

>
> Older versions of subversion include some blank lines in the output of the
> import and copy subcommands, which have gone away in newer versions.  Allow
> for both by enhancing the output filter to remove blank lines.
>
> diff --git a/tests/test-convert-hg-svn.t b/tests/test-convert-hg-svn.t
> --- a/tests/test-convert-hg-svn.t
> +++ b/tests/test-convert-hg-svn.t
> @@ -1,7 +1,7 @@
>  #require svn svn-bindings
>
>    $ filter_svn_output () {
> -  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' || true
> +  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' -e '/^$/d' || true
>    > }
>
>    $ cat <<EOF >> $HGRCPATH
> diff --git a/tests/test-convert-svn-source.t b/tests/test-convert-svn-source.t
> --- a/tests/test-convert-svn-source.t
> +++ b/tests/test-convert-svn-source.t
> @@ -1,7 +1,7 @@
>  #require svn svn-bindings
>
>    $ filter_svn_output () {
> -  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' || true
> +  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' -e '/^$/d' || true
>    > }
>
>    $ cat >> $HGRCPATH <<EOF
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-convert-hg-svn.t b/tests/test-convert-hg-svn.t
--- a/tests/test-convert-hg-svn.t
+++ b/tests/test-convert-hg-svn.t
@@ -1,7 +1,7 @@ 
 #require svn svn-bindings
 
   $ filter_svn_output () {
-  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' || true
+  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' -e '/^$/d' || true
   > }
 
   $ cat <<EOF >> $HGRCPATH
diff --git a/tests/test-convert-svn-source.t b/tests/test-convert-svn-source.t
--- a/tests/test-convert-svn-source.t
+++ b/tests/test-convert-svn-source.t
@@ -1,7 +1,7 @@ 
 #require svn svn-bindings
 
   $ filter_svn_output () {
-  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' || true
+  >     egrep -v 'Committing|Updating' | sed -e 's/done$//' -e '/^$/d' || true
   > }
 
   $ cat >> $HGRCPATH <<EOF