changeset 33258:761ccfeff8b1

streamclone: stop using 'vfs.mustaudit = False' Now that each call disable the auditing on its own, we can safely drop this the mustaudit usage. No other code is modified.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 02 Jul 2017 04:26:34 +0200
parents 15e9cbe6ae49
children 6fb5c5096887
files mercurial/streamclone.py
diffstat 1 files changed, 12 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/streamclone.py	Sun Jul 02 02:28:04 2017 +0200
+++ b/mercurial/streamclone.py	Sun Jul 02 04:26:34 2017 +0200
@@ -213,26 +213,21 @@
                   (len(entries), total_bytes))
 
     svfs = repo.svfs
-    oldaudit = svfs.mustaudit
     debugflag = repo.ui.debugflag
-    svfs.mustaudit = False
 
     def emitrevlogdata():
-        try:
-            for name, size in entries:
-                if debugflag:
-                    repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
-                # partially encode name over the wire for backwards compat
-                yield '%s\0%d\n' % (store.encodedir(name), size)
-                if size <= 65536:
-                    with svfs(name, 'rb', auditpath=False) as fp:
-                        yield fp.read(size)
-                else:
-                    data = svfs(name, auditpath=False)
-                    for chunk in util.filechunkiter(data, limit=size):
-                        yield chunk
-        finally:
-            svfs.mustaudit = oldaudit
+        for name, size in entries:
+            if debugflag:
+                repo.ui.debug('sending %s (%d bytes)\n' % (name, size))
+            # partially encode name over the wire for backwards compat
+            yield '%s\0%d\n' % (store.encodedir(name), size)
+            if size <= 65536:
+                with svfs(name, 'rb', auditpath=False) as fp:
+                    yield fp.read(size)
+            else:
+                data = svfs(name, auditpath=False)
+                for chunk in util.filechunkiter(data, limit=size):
+                    yield chunk
 
     return len(entries), total_bytes, emitrevlogdata()