The upstream has added some warning around repo.svfs/vfs write operations
without taking locks. For undo, we don't want to take the repo lock (since
that means read-only operations like hg log will be blocked by another
hg commit). So undo has its own locking and own transaction (for lower
overhead). Therefore move all files we may write (including lock and
transaction files) to .hg/undolog and whitelist the directory at
localrepository._wlockfreeprefix to bypass the checks.
Details
Details
- Reviewers
durham ryanmce - Group Reviewers
Restricted Project - Commits
- rFBHGX910ef98c3557: undo: move undolog to vfs and mark as lock-safe
Diff Detail
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Why not just use the normal vfs? Then you don't need your own vfs object. The undo log can be written to even if only the working copy or bookmarks change (so no store lock was ever taken), so it seems like it would live at the .hg level instead of the store level?
Comment Actions
Good point. IIRC the choice of svfs was because repo.transaction somehow hardcodes it to track revlogs. Since we have our own transaction now I'll try to use vfs.