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

Augie Fackler raf at durin42.com
Wed Mar 16 12:54:02 EDT 2016


On Tue, Mar 15, 2016 at 02:02:44PM -0700, danek.duvall at oracle.com wrote:
> # HG changeset patch
> # User Danek Duvall <danek.duvall at 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 at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list