[PATCH 2 of 4] tests: use debuginstall to retrieve hg version
timeless
timeless at gmail.com
Wed May 11 10:33:32 EDT 2016
I'll resend this.
It should be hg debuginstall -T "{hgver}" ... I forgot that the
advantage of teaching debuginstall -T is that one can actually do
useful stuff with it.
On Wed, May 11, 2016 at 1:23 AM, timeless <timeless at fmr.im> wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1462920746 0
> # Tue May 10 22:52:26 2016 +0000
> # Node ID 9cd2f021a0de791a9b58d820271553814c76ab18
> # Parent 8c51b867ca30b264bc55047986e4de25edb3ef75
> # EXP-Topic runtests
> # Available At bb://timeless/mercurial-crew
> # hg pull bb://timeless/mercurial-crew -r 9cd2f021a0de
> tests: use debuginstall to retrieve hg version
>
> diff -r 8c51b867ca30 -r 9cd2f021a0de tests/test-extension.t
> --- a/tests/test-extension.t Tue May 10 22:45:45 2016 +0000
> +++ b/tests/test-extension.t Tue May 10 22:52:26 2016 +0000
> @@ -958,8 +958,9 @@
> ** Extensions loaded: throw, older
>
> Declare the version as supporting this hg version, show regular bts link:
> - $ hgver=`$PYTHON -c 'from mercurial import util; print util.version().split("+")[0]'`
> - $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
> + $ hgver=`hg debuginstall -Tjson |egrep '"hgver":'| \
> + > sed -e 's/.*:\s*//;s/,.*//'|cat`
> + $ echo 'testedwith = ""'$hgver'""' >> throw.py
> $ if [ -z "$hgver" ]; then
> > echo "unable to fetch a mercurial version. Make sure __version__ is correct";
> > fi
> _______________________________________________
> 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