Commit Graph

1 Commits (c6f8c88b92c0a63bf631bb04647572ac6390f82e)

Author SHA1 Message Date
Josiah Kiehl c6f8c88b92 Abort gclient-new-workdir on Btrfs snapshot failure
When attempting to create a Btrfs subvolume snapshot fails, the script
previously fell back to a slow file-by-file copy. This change modifies
the behavior to instead abort early if the source is detected to be a
Btrfs subvolume.

If the snapshot fails for a subvolume, the script now prints diagnostic
information to help the user troubleshoot and exits, saving the user
from an unexpectedly long copy operation. The fallback behavior is
preserved for non-subvolumes where snapshots are not supported.

This also adds unit tests for the new abort and diagnostic behaviors.

Change-Id: Ieee9fec08d9664d3bdffc255b6993fa2f6d8ad70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7713376
Commit-Queue: Josiah Kiehl <kiehl@google.com>
Reviewed-by: Erik Staab <estaab@google.com>
3 weeks ago