Patchwork D5808: py3: do a fsdecode(), fsencode() dance in posix.py

login
register
mail settings
Submitter phabricator
Date Feb. 3, 2019, 12:48 p.m.
Message ID <815693de950a98df37c53f6489d09ef0@localhost.localdomain>
Download mbox | patch
Permalink /patch/38347/
State Not Applicable
Headers show

Comments

phabricator - Feb. 3, 2019, 12:48 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG512eb4af4295: py3: do a fsdecode(), fsencode() dance in posix.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5808?vs=13712&id=13721

REVISION DETAIL
  https://phab.mercurial-scm.org/D5808

AFFECTED FILES
  mercurial/posix.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -583,8 +583,8 @@ 
     """Return the list of members of the group with the given
     name, KeyError if the group does not exist.
     """
-    name = pycompat.sysstr(name)
-    return list(grp.getgrnam(name).gr_mem)
+    name = pycompat.fsdecode(name)
+    return pycompat.rapply(pycompat.fsencode, list(grp.getgrnam(name).gr_mem))
 
 def spawndetached(args):
     return os.spawnvp(os.P_NOWAIT | getattr(os, 'P_DETACH', 0),