D3636: py3: use pycompat.fsencode() to convert user value to bytes

Yuya Nishihara yuya at tcha.org
Tue May 22 07:06:58 EDT 2018


On Sun, 20 May 2018 13:40:10 +0000, pulkit (Pulkit Goyal) wrote:
> --- a/mercurial/debugcommands.py
> +++ b/mercurial/debugcommands.py
> @@ -1400,7 +1400,7 @@
>              try:
>                  st = vfs.lstat(name)
>                  age = now - st[stat.ST_MTIME]
> -                user = util.username(st.st_uid)
> +                user = pycompat.fsencode(util.username(st.st_uid))

This should be handled by posix/windows.username() just like the other
functions.


More information about the Mercurial-devel mailing list