equal
deleted
inserted
replaced
318 if self.createmode is None or not self._chmod: |
318 if self.createmode is None or not self._chmod: |
319 return |
319 return |
320 os.chmod(name, self.createmode & 0o666) |
320 os.chmod(name, self.createmode & 0o666) |
321 |
321 |
322 def __call__(self, path, mode="r", text=False, atomictemp=False, |
322 def __call__(self, path, mode="r", text=False, atomictemp=False, |
323 notindexed=False, backgroundclose=False, checkambig=False): |
323 notindexed=False, backgroundclose=False, checkambig=False, |
|
324 auditpath=True): |
324 '''Open ``path`` file, which is relative to vfs root. |
325 '''Open ``path`` file, which is relative to vfs root. |
325 |
326 |
326 Newly created directories are marked as "not to be indexed by |
327 Newly created directories are marked as "not to be indexed by |
327 the content indexing service", if ``notindexed`` is specified |
328 the content indexing service", if ``notindexed`` is specified |
328 for "write" mode access. |
329 for "write" mode access. |
342 |
343 |
343 ``checkambig`` argument is passed to atomictemplfile (valid |
344 ``checkambig`` argument is passed to atomictemplfile (valid |
344 only for writing), and is useful only if target file is |
345 only for writing), and is useful only if target file is |
345 guarded by any lock (e.g. repo.lock or repo.wlock). |
346 guarded by any lock (e.g. repo.lock or repo.wlock). |
346 ''' |
347 ''' |
347 if self._audit: |
348 if auditpath: |
348 r = util.checkosfilename(path) |
349 if self._audit: |
349 if r: |
350 r = util.checkosfilename(path) |
350 raise error.Abort("%s: %r" % (r, path)) |
351 if r: |
351 self.audit(path) |
352 raise error.Abort("%s: %r" % (r, path)) |
|
353 self.audit(path) |
352 f = self.join(path) |
354 f = self.join(path) |
353 |
355 |
354 if not text and "b" not in mode: |
356 if not text and "b" not in mode: |
355 mode += "b" # for that other OS |
357 mode += "b" # for that other OS |
356 |
358 |