문제

Mercurial's log command contains a parameter -u USER to filter the changesets such that only the changes by USER are displayed. I was wondering if there is a way to tell hg to take the username from my .hgrc.

I am aware that I can simply use an alias like the following in .hgrc:

[alias]
ulog = log -u MYUSERNAME

Unfortunately, if I want to share parts of my configuration with other people by using %include, thus they will not be able to use the alias in the intended way.

So, my question is: Is there a way to refer to other variables in a .hgrc file?

도움이 되었습니까?

해결책

You cannot refer to other values in the .hgrc when defining a new value. However, for this particular case you're in luck: things like ~foo and $USER are expanded in aliases. This means that you can define your alias like this

[alias]
ulog = log -u $USER

This is not quite what you ask for, but if all your users are on Linux, it should work fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top