[PATCH 1 of 2] tests: add missing parens in test-obsolete-bundle-strip.t

Yuya Nishihara yuya at tcha.org
Sat Jun 3 11:19:10 EDT 2017


On Sat, 03 Jun 2017 00:35:18 -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1496471360 25200
> #      Fri Jun 02 23:29:20 2017 -0700
> # Node ID f782e04fb7d18868cf7da00a41aaa8f15c8e8802
> # Parent  783394c0c97807e83daad9da561179bd0719e159
> tests: add missing parens in test-obsolete-bundle-strip.t
> 
> The "(not ${revs})" was missing parens around ${revs}, so when revs
> was "A + B", it became "(not A + B)" when actually "(not (A + B))" was
> intended. Fixing that leads to some more testing of strip.
> 
> 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
> @@ -76,7 +76,7 @@
>    >     echo '### Exclusive markers ###'
>    >     cat "${exclufile}"
>    >     # if the matched revs do not have children, we also check the result of strip
> -  >     orphan=`hg log --hidden -T '.\n' --rev "(not ${revs}) and (${revs}::)" | wc -l | sed -e 's/ //g'`
> +  >     orphan=`hg log --hidden -T '.\n' --rev "(not (${revs})) and (${revs}::)" | wc -l | sed -e 's/ //g'`

Maybe ${revs}:: will need parens as well?


More information about the Mercurial-devel mailing list