First noticed in 12.04 still persists in 14.04 This happens when to change to a system user (www-data, postgres, etc) and not for a user which has a desktop profile setup.

What I have tried:

  • Copy .profile and .bashrc from a user to the www-data user which shows colors in the ls command but still no color in mercurial

Reproducing the problem (colors show for the first hg stat command but not the second):

sudo su -
hg stat
su - www-data
hg stat

Sounds like a simple configuration issue. You successfully got colored ls output after copying suitable .bashrc and .profile files to the other user's (e.g., www-data) home directory. Obtaining colored output in mercurial should presumably be as simple as additionally copying a suitable .hgrc file.

Also see the mercurial man page.

| improve this answer | |
  • Actually its not that simple because there is no .hgrc file in any users profile. The color is coming by default in the root user and its not in the /etc/mercurial location either – eskhool Nov 20 '14 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.