pub fn write_lockfile(root: &Path, lockfile: &Lockfile) -> Result<()>
Write drft.lock atomically using temp file + rename.
drft.lock