[PATCH V3] hgweb: don't attempt to show hidden bookmarks (issue3774)
Greg Ward
greg at gerg.ca
Fri Jan 25 22:07:44 UTC 2013
On 25 January 2013, Kevin Bullock said:
> # HG changeset patch
> # User Kevin Bullock <kbullock at ringworld.org>
> # Date 1359135834 21600
> # Branch stable
> # Node ID f8a44ed8139d3f07038969845a3ef527d6c0b826
> # Parent 075143f60807c96fd051fd1dde5830852e4e6099
> hgweb: don't attempt to show hidden bookmarks (issue3774)
> diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
> --- a/tests/test-bookmarks-pushpull.t
> +++ b/tests/test-bookmarks-pushpull.t
> @@ -288,6 +288,16 @@ hgweb
>
> $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
> $ cat ../hg.pid >> $DAEMON_PIDS
> +
> +issue3774
> +
> + $ hg phase -fs X
> + $ "$TESTDIR/get-with-headers.py" --headeronly 127.0.0.1:$HGPORT 'bookmarks'
> + 200 Script output follows
> + $ sleep 0.1
> + $ cat errors.log
> + $ hg phase -d X
> +
Rule 1 of concurrent programming: if your code requires a sleep to
work correctly, it's racy. That applies to tests just as much as to
production code.
Also, I strongly suspect that floating point sleep times are a GNUism.
Portability requires "sleep 1", which will slow the test down
annoyingly, which will cause you to delete the sleep, which should
make the race condition more obvious! ;-)
Greg
--
Greg Ward http://www.gerg.ca
<greg at gerg.ca> @gergdotca
More information about the Mercurial-devel
mailing list