diff tests/test-trusted.py @ 3677:1a0fa3914c46

Avoid looking up usernames if the current user owns the .hgrc file Converting uids into usernames may be somewhat expensive when NIS or LDAP is involved.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 18 Nov 2006 23:51:14 -0200
parents 9b52239dc740
children 306055f5b65c
line wrap: on
line diff
--- a/tests/test-trusted.py
+++ b/tests/test-trusted.py
@@ -41,6 +41,10 @@ def testui(user='foo', group='bar', tuse
         return group
     util.groupname = groupname
 
+    def isowner(fp, st=None):
+        return user == cuser
+    util.isowner = isowner
+
     # try to read everything
     #print '# File belongs to user %s, group %s' % (user, group)
     #print '# trusted users = %s; trusted groups = %s' % (tusers, tgroups)