[PATCH 1 of 2] dispatch: defer environment variable resolution in alias commands (BC)

Yuya Nishihara yuya at tcha.org
Sat May 7 05:36:32 EDT 2016


On Sat, 7 May 2016 00:22:48 +0100, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1462576618 -3600
> #      Sat May 07 00:16:58 2016 +0100
> # Node ID 24dc9e5deec415bfa635fb80c7767ef5146c2775
> # Parent  b473b7bd02b3bad724c0178ec08ae49019aed51c
> dispatch: defer environment variable resolution in alias commands (BC)

Awesome! Pushed to the committed repo, thanks.

> +environment variable changes in alias commands
> +
> +  $ cat > $TESTTMP/setcount.py <<EOF
> +  > import os
> +  > def uisetup(ui):
> +  >     os.environ['COUNT'] = '2'
> +  > EOF
> +
> +  $ cat >> $HGRCPATH <<'EOF'
> +  > [extensions]
> +  > setcount = $TESTTMP/setcount.py
> +  > [alias]
> +  > showcount = log -T "$COUNT\n" -r .
> +  > EOF
> +
> +  $ COUNT=1 hg showcount
> +  2

This doesn't pass with --chg due to uisetup() hack. Can you fix it by follow-up
patch?


More information about the Mercurial-devel mailing list