[PATCH 1 of 2] acl: replace bare getpass.getuser() by platform function

Matt Harbison mharbison72 at gmail.com
Tue Feb 27 05:18:39 UTC 2018


On Sat, 24 Feb 2018 21:43:01 -0500, Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1519524781 -32400
> #      Sun Feb 25 11:13:01 2018 +0900
> # Node ID 03eff66adb3b53f9776628f83b6433ee7b57ee52
> # Parent  38f4805020437f126f5c1c8f41d78445f9ab6547
> acl: replace bare getpass.getuser() by platform function
>
> Follows up dbadf28d4db0. bytestr() shouldn't be applied here because  
> getuser()
> isn't guaranteed to be all in ASCII.
>
> This change means GetUserNameA() is used on Windows, but that's probably
> better than trying to get the current user name in UNIX way.

This ends up using the real Windows user, which breaks test-acl.t.  I  
didn't look past the first failure, but maybe a common-pattern.py  
substitution can be cooked up?  I assume globbing the user away totally is  
wrong.


More information about the Mercurial-devel mailing list