changeset 11138 | 99eee847beaa |
parent 11011 | 648130161e4d |
child 12689 | c52c629ce19e |
--- a/mercurial/posix.py Sun May 09 22:51:25 2010 +0200 +++ b/mercurial/posix.py Mon May 10 21:09:48 2010 +0200 @@ -259,6 +259,12 @@ except KeyError: return str(gid) +def groupmembers(name): + """Return the list of members of the group with the given + name, KeyError if the group does not exist. + """ + return list(grp.getgrnam(name).gr_mem) + def spawndetached(args): return os.spawnvp(os.P_NOWAIT | getattr(os, 'P_DETACH', 0), args[0], args)