hg-ssh
changeset 15 f3654416d178
parent 10 524b4a45ef0a
child 18 538d6b198f4a
equal deleted inserted replaced
14:e7d5254cd0ca 15:f3654416d178
    67                 continue
    67                 continue
    68             rule, rk, rp = l.split()
    68             rule, rk, rp = l.split()
    69             if globmatch(rk, keyname) and globmatch(rp, path):
    69             if globmatch(rk, keyname) and globmatch(rp, path):
    70                 #logfile.write("Used rule: %s\n" % l)
    70                 #logfile.write("Used rule: %s\n" % l)
    71                 return rule in applicable
    71                 return rule in applicable
    72         return False
       
    73     finally:
    72     finally:
    74         f.close()
    73         f.close()
       
    74     return False
    75 
    75 
    76 def get_cmd(rulefile, keyname, cmd):
    76 def get_cmd(rulefile, keyname, cmd):
    77     if cmd.startswith('hg -R ') and cmd.endswith(' serve --stdio'):
    77     if cmd.startswith('hg -R ') and cmd.endswith(' serve --stdio'):
    78         path = cmd[6:-14]
    78         path = cmd[6:-14]
    79         if testrule(rulefile, keyname, path, set(["allow", "init"])):
    79         if testrule(rulefile, keyname, path, set(["allow", "init"])):