equal
deleted
inserted
replaced
39 path = lfutil.storepath(repo, sha) |
39 path = lfutil.storepath(repo, sha) |
40 util.makedirs(os.path.dirname(path)) |
40 util.makedirs(os.path.dirname(path)) |
41 tmpfp = util.atomictempfile(path, createmode=repo.store.createmode) |
41 tmpfp = util.atomictempfile(path, createmode=repo.store.createmode) |
42 |
42 |
43 try: |
43 try: |
44 proto.forwardpayload(tmpfp) |
44 for p in proto.getpayload(): |
|
45 tmpfp.write(p) |
45 tmpfp._fp.seek(0) |
46 tmpfp._fp.seek(0) |
46 if sha != lfutil.hexsha1(tmpfp._fp): |
47 if sha != lfutil.hexsha1(tmpfp._fp): |
47 raise IOError(0, _('largefile contents do not match hash')) |
48 raise IOError(0, _('largefile contents do not match hash')) |
48 tmpfp.close() |
49 tmpfp.close() |
49 lfutil.linktousercache(repo, sha) |
50 lfutil.linktousercache(repo, sha) |