Patchwork D5608: shallowutil: fsdecode the bytes group name before passing to os

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2019, 5:21 p.m.
Message ID <293e30a4d6ae097a1eb5222dda24631c@localhost.localdomain>
Download mbox | patch
Permalink /patch/37827/
State Not Applicable
Headers show

Comments

phabricator - Jan. 16, 2019, 5:21 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa6b98c95bcf0: shallowutil: fsdecode the bytes group name before passing to os (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5608?vs=13268&id=13288

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

AFFECTED FILES
  hgext/remotefilelog/shallowutil.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/remotefilelog/shallowutil.py b/hgext/remotefilelog/shallowutil.py
--- a/hgext/remotefilelog/shallowutil.py
+++ b/hgext/remotefilelog/shallowutil.py
@@ -420,7 +420,7 @@ 
 
 def getgid(groupname):
     try:
-        gid = grp.getgrnam(groupname).gr_gid
+        gid = grp.getgrnam(pycompat.fsdecode(groupname)).gr_gid
         return gid
     except KeyError:
         return None