1. TortoiseHg
  2. TortoiseHg
  3. thg
Issue #2363 resolved

HGUSER env var not honored

Elifarley Cruz
created an issue

It seems that 8c32919 introduced a bug: If my username is set via the env var "HGUSER" (see Setting up a username), I won't be able to commit, since only ui().config('ui', 'username') is checked.

Comments (4)

  1. Yuya Nishihara

    qtlib: make sure getCurrentUsername() not fall back to system value

    If not ui.interactive(), ui.username() does not fail even if username is unconfigured. Thus, getCurrentUsername() cannot detect missing username in this case. To avoid this problem, it should check the existence of config or environment variables before calling ui.username().

    http://selenic.com/hg/file/5db16424142c/mercurial/ui.py#l394

    Alternatively, we can hack ui object to raise util.Abort appropriately, but it seems much more complicated than this change.

    Closes #2363.

    → <<cset 3619f14ee3b6>>

  2. Log in to comment