Skip to content
Snippets Groups Projects
Commit 879029f03324 authored by Mitchell Kember's avatar Mitchell Kember
Browse files

rust-config: add username parsing

This adds Config::username which returns HGUSER, ui.username, or EMAIL in that
order, similar to ui.username() in Python.

I considered following the pattern of EDITOR, VISUAL, PAGER, etc. and using
add_for_environment_variable, but it's not possible to get the same precendence
as in Python that way (in particular HGUSER coming after the repo .hg/hgrc), at
least not without significant changes.

This will be used for 'rhg annotate -r wdir() -u' to annotate the username on
lines that were changed in the working directory.
parent d81714a1c88d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment