##// END OF EJS Templates
largefiles: don't store whole file in memory for 'cat'
Mads Kiilerich -
r18973:5f9019e6 default
parent child Browse files
Show More
@@ -542,7 +542,8 b' def catlfile(repo, lfile, rev, filename)'
542 path = lfutil.usercachepath(repo.ui, hash)
542 path = lfutil.usercachepath(repo.ui, hash)
543 fpout = cmdutil.makefileobj(repo, filename)
543 fpout = cmdutil.makefileobj(repo, filename)
544 fpin = open(path, "rb")
544 fpin = open(path, "rb")
545 fpout.write(fpin.read())
545 for chunk in lfutil.blockstream(fpin):
546 fpout.write(chunk)
546 fpout.close()
547 fpout.close()
547 fpin.close()
548 fpin.close()
548 return 0
549 return 0
General Comments 0
You need to be logged in to leave comments. Login now