Subversion sparse checkout depth and merge behavior
21.5K reputation · 31 May 2020, 22:34 UTC
Apache Subversion supports sparse checkouts via the --depth option, allowing a working copy to track only a subset of the repository tree. This is typically managed using svn update --set-depth to toggle between empty, files, immediates, and infinity.
A challenge arises when performing merges into a working copy configured with sparse depth settings. Because the merge process may encounter changes in directories or files that are intentionally excluded from the local disk, the interaction between the merge engine and the working copy metadata requires clarification.
Specifically, it is unclear how SVN handles merge conflicts or property changes for paths that exist in the repository but are marked as excluded in the sparse checkout.
- Does a merge automatically trigger the retrieval of excluded files if they are targets of a change?
- How does the
svn statuscommand differentiate between a file missing due to a sparse checkout and a file deleted during a merge operation?