mrl
mrl

Reputation: 1536

Mercurial can't find username config on Cygwin

I am getting the abort: no username supplied (see "hg help config") error when trying to use hg commit on Cygwin. I have setup the Mercurial.ini file properly in my /users/username directory (I am on Windows 7).

Using hg showconfig --debug returns the following:

read config from: /usr/etc/mercurial/hgrc
read config from: /etc/mercurial/hgrc
read config from: /home/Mark/.hgrc

Thus I am assuming since I'm using Cygwin, it's checking for the Mercurial config files as though I was using Linux. Has anyone else encountered this problem using Mercurial with Cygwin?

How can I get Mercurial to check in the right folders for the config files (again for using Cygwin on Windows 7)?

Upvotes: 0

Views: 977

Answers (1)

Clare Macrae
Clare Macrae

Reputation: 3799

As a workaround, you could just set the HGUSER environment variable to your desired user name.

But a better solution would be to add a %include line to one of the hgrc files that Hg is reading, to force it to include the one you created - something like:

%include /users/username/.hgrc

You might even be able to get Cygwin to use $USER or similar, to avoid a hard-coded username.

See the hgrc man page for more info.

Upvotes: 1

Related Questions