mercurial/posix.py
changeset 41827 faa04f45b5fe
parent 41523 3ef8bec91465
child 42562 97ada9b8d51b
--- a/mercurial/posix.py	Fri Mar 01 02:53:09 2019 +0900
+++ b/mercurial/posix.py	Sat Mar 02 05:01:00 2019 +0530
@@ -575,9 +575,9 @@
     if gid is None:
         gid = os.getgid()
     try:
-        return grp.getgrgid(gid)[0]
+        return pycompat.fsencode(grp.getgrgid(gid)[0])
     except KeyError:
-        return str(gid)
+        return pycompat.bytestr(gid)
 
 def groupmembers(name):
     """Return the list of members of the group with the given