[PATCH] solaris: solaris grep doesn't have -A; reimplement with awk

Yuya Nishihara yuya at tcha.org
Fri Jun 2 23:39:41 EDT 2017


On Fri, 02 Jun 2017 16:20:06 -0700, danek.duvall at oracle.com wrote:
> # HG changeset patch
> # User Danek Duvall <danek.duvall at oracle.com>
> # Date 1496445527 25200
> #      Fri Jun 02 16:18:47 2017 -0700
> # Node ID d41ec8a079648101eae94a25e05c6d7a7b26b653
> # Parent  e6ff007e107e434b35eb881711f459c7a75c91b2
> solaris: solaris grep doesn't have -A; reimplement with awk
> 
> diff --git a/tests/test-obsolete-bundle-strip.t b/tests/test-obsolete-bundle-strip.t
> --- a/tests/test-obsolete-bundle-strip.t
> +++ b/tests/test-obsolete-bundle-strip.t
> @@ -67,7 +67,7 @@ obsmarkers.
>    >     cat "${markersfile}"
>    >     printf "# bundling: "
>    >     hg bundle --hidden --base "parents(roots(${revs}))" --rev "${revs}" "${bundlefile}"
> -  >     hg debugbundle "${bundlefile}" | grep "obsmarkers --" -A 100 | sed 1,2d > "${contentfile}"
> +  >     hg debugbundle "${bundlefile}" | awk '/obsmarkers --/ {p=1} p == 1 {print}' | sed 1,2d > "${contentfile}"

awk is new dependency. Can't we add an option to filter debugbundle output
(e.g. "hg debugbundle --part-type obsmarkers")?


More information about the Mercurial-devel mailing list