mercurial/util.py
changeset 13926 61ba09d8d118
parent 13916 98ee3dd5bab4
child 13928 155d2e17884e
equal deleted inserted replaced
13925:c315ffc13a25 13926:61ba09d8d118
   600                 break
   600                 break
   601             check(prefix)
   601             check(prefix)
   602             prefixes.append(prefix)
   602             prefixes.append(prefix)
   603             parts.pop()
   603             parts.pop()
   604 
   604 
   605         r = checkosfilename(path)
       
   606         if r:
       
   607             raise Abort("%s: %s" % (r, path))
       
   608         self.audited.add(path)
   605         self.audited.add(path)
   609         # only add prefixes to the cache after checking everything: we don't
   606         # only add prefixes to the cache after checking everything: we don't
   610         # want to add "foo/bar/baz" before checking if there's a "foo/.hg"
   607         # want to add "foo/bar/baz" before checking if there's a "foo/.hg"
   611         self.auditeddir.update(prefixes)
   608         self.auditeddir.update(prefixes)
   612 
   609 
   914         if self.createmode is None:
   911         if self.createmode is None:
   915             return
   912             return
   916         os.chmod(name, self.createmode & 0666)
   913         os.chmod(name, self.createmode & 0666)
   917 
   914 
   918     def __call__(self, path, mode="r", text=False, atomictemp=False):
   915     def __call__(self, path, mode="r", text=False, atomictemp=False):
       
   916         r = checkosfilename(path)
       
   917         if r:
       
   918             raise Abort("%s: %s" % (r, path))
   919         self.auditor(path)
   919         self.auditor(path)
   920         f = os.path.join(self.base, path)
   920         f = os.path.join(self.base, path)
   921 
   921 
   922         if not text and "b" not in mode:
   922         if not text and "b" not in mode:
   923             mode += "b" # for that other OS
   923             mode += "b" # for that other OS