##// END OF EJS Templates
exchange: replace references to 'sopener' with 'svfs'
Siddharth Agarwal -
r25668:1c2df7c9 default
parent child Browse files
Show More
@@ -1484,10 +1484,10 b' def generatestreamclone(repo):'
1484 1484 (len(entries), total_bytes))
1485 1485 yield '%d %d\n' % (len(entries), total_bytes)
1486 1486
1487 sopener = repo.svfs
1488 oldaudit = sopener.mustaudit
1487 svfs = repo.svfs
1488 oldaudit = svfs.mustaudit
1489 1489 debugflag = repo.ui.debugflag
1490 sopener.mustaudit = False
1490 svfs.mustaudit = False
1491 1491
1492 1492 try:
1493 1493 for name, size in entries:
@@ -1496,17 +1496,17 b' def generatestreamclone(repo):'
1496 1496 # partially encode name over the wire for backwards compat
1497 1497 yield '%s\0%d\n' % (store.encodedir(name), size)
1498 1498 if size <= 65536:
1499 fp = sopener(name)
1499 fp = svfs(name)
1500 1500 try:
1501 1501 data = fp.read(size)
1502 1502 finally:
1503 1503 fp.close()
1504 1504 yield data
1505 1505 else:
1506 for chunk in util.filechunkiter(sopener(name), limit=size):
1506 for chunk in util.filechunkiter(svfs(name), limit=size):
1507 1507 yield chunk
1508 1508 finally:
1509 sopener.mustaudit = oldaudit
1509 svfs.mustaudit = oldaudit
1510 1510
1511 1511 def consumestreamclone(repo, fp):
1512 1512 """Apply the contents from a streaming clone file.
General Comments 0
You need to be logged in to leave comments. Login now