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

Martin von Zweigbergk martinvonz at google.com
Sat Jun 3 11:33:11 EDT 2017


On Jun 3, 2017 8:22 AM, "Yuya Nishihara" <yuya at tcha.org> wrote:

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?


Wow, how did I miss that? :-) Glad you noticed. I'll send an update tonight.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170603/e94c6ae5/attachment.html>


More information about the Mercurial-devel mailing list