diff mercurial/posix.py @ 11138:99eee847beaa

acl: grp module is not available on windows
author Patrick Mezard <pmezard@gmail.com>
date Mon, 10 May 2010 21:09:48 +0200
parents 648130161e4d
children c52c629ce19e
line wrap: on
line diff
--- 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)