comparison mercurial/localrepo.py @ 1473:7d66ce9895fa

make readconfig take a filename instead of a file pointer as argument catch parse error while reading a config file add a testcase for parse error
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 27 Oct 2005 13:40:56 -0700
parents 0847c45ffee6
children d3566eda2bcb
comparison
equal deleted inserted replaced
1472:3c909a747d7f 1473:7d66ce9895fa
41 os.mkdir(self.path) 41 os.mkdir(self.path)
42 os.mkdir(self.join("data")) 42 os.mkdir(self.join("data"))
43 43
44 self.dirstate = dirstate.dirstate(self.opener, ui, self.root) 44 self.dirstate = dirstate.dirstate(self.opener, ui, self.root)
45 try: 45 try:
46 self.ui.readconfig(self.opener("hgrc")) 46 self.ui.readconfig(os.path.join(self.path, "hgrc"))
47 except IOError: pass 47 except IOError: pass
48 48
49 def hook(self, name, **args): 49 def hook(self, name, **args):
50 s = self.ui.config("hooks", name) 50 s = self.ui.config("hooks", name)
51 if s: 51 if s: