2

I have two machines running Mercurial, a Solaris system and a Red Hat system.

On the Solaris system I can use environment variables in the .hgrc file, but on the Red Hat system it doesn't seem to work.

I have the following example in the .hgrc file:

[ui]
username = $SUDO_USER

but hg log shows me the following:

user:        $SUDO_USER

The variable is set and is exported:

$ env|grep SUDO_USER
SUDO_USER=testuser

The same setup works fine on the Solaris system. Can anyone tell me why this doesn't work?

Veger
  • 37,240
  • 11
  • 105
  • 116
Subbeh
  • 886
  • 2
  • 7
  • 14
  • 1
    what version of mercurical do you have on Red Hat? they claim it's usable since 1.4 version: http://mercurial.selenic.com/wiki/TipsAndTricks#Using_environment_variables_in_hgrc_files – Peter Butkovic Jan 23 '13 at 10:36

1 Answers1

2

You can only use environment variables with mercurial version 1.4+ according to this page.

So make sure you have the most recent version installed.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Veger
  • 37,240
  • 11
  • 105
  • 116