Commit Graph

3 Commits

Author SHA1 Message Date
Levi Bard
745707ea8a largefiles: fix inappropriate locking (issue3182)
Don't lock/write on operations that should be readonly (status).
Always lock when writing the lfdirstate (rollback).
Don't write lfdirstate until after committing; state isn't actually changed
until the commit is complete.
2012-01-07 19:05:59 +01:00
Martin Geisler
161f84c84c largefiles: copy files into .hg/largefiles atomically
Copying from the user cache into .hg/largefiles could fail halfway
though with a partially written file.
2011-11-24 18:13:18 +01:00
Martin Geisler
de1d410b06 largefiles: write .hg/largefiles/ files atomically
Before, it was possible to create a

  .hg/largefiles/hash

file with truncated content, i.e., content where

  SHA-1(content) != hash

This breaks the fundamental invariant in largefiles that the file
content for files in .hg/largefiles hash to the filename.
2011-11-24 18:12:13 +01:00