Show More
@@ -225,10 +225,11 b' def generatev1(repo):' | |||||
225 | # partially encode name over the wire for backwards compat |
|
225 | # partially encode name over the wire for backwards compat | |
226 | yield '%s\0%d\n' % (store.encodedir(name), size) |
|
226 | yield '%s\0%d\n' % (store.encodedir(name), size) | |
227 | if size <= 65536: |
|
227 | if size <= 65536: | |
228 | with svfs(name, 'rb') as fp: |
|
228 | with svfs(name, 'rb', auditpath=False) as fp: | |
229 | yield fp.read(size) |
|
229 | yield fp.read(size) | |
230 | else: |
|
230 | else: | |
231 |
|
|
231 | data = svfs(name, auditpath=False) | |
|
232 | for chunk in util.filechunkiter(data, limit=size): | |||
232 | yield chunk |
|
233 | yield chunk | |
233 | finally: |
|
234 | finally: | |
234 | svfs.mustaudit = oldaudit |
|
235 | svfs.mustaudit = oldaudit |
@@ -320,7 +320,8 b' class vfs(abstractvfs):' | |||||
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 | |
@@ -344,11 +345,12 b' class vfs(abstractvfs):' | |||||
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 |
|
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: |
General Comments 0
You need to be logged in to leave comments.
Login now