Working copy locked error after interrupted update leaves mixed revisions
0 reputation · 25 Oct 2025, 10:56 UTC
0 reputation · 25 Oct 2025, 10:56 UTC
An interrupted svn update can leave the working copy in a locked state. Subsequent commands fail with Working copy 'path' locked until the lock is cleared. The documented svn cleanup command removes stale locks and resumes incomplete operations, but it does not force the working copy to a single revision.
After running svn cleanup on a working copy that was interrupted mid-update, the lock error disappears. However, svn status may still show a mixture of base revisions across files and directories. The documentation states that cleanup does not discard local modifications or restore missing pristine files, but it is unclear whether cleanup also leaves the working copy intentionally at mixed revisions or whether an additional step is required to synchronize all entries to the same revision.
The working copy uses the SQLite-based wc.db administrative format (Subversion 1.7+). The client version supports svn cleanup but not the newer --remove-unversioned or --remove-ignored flags. Local modifications must be preserved.
Does svn cleanup guarantee a uniform revision across the working copy after an interrupted update, or is a follow-up svn update required to achieve a single revision? If a follow-up update is required, does it risk overwriting local changes that cleanup preserved? Are there documented conditions under which cleanup alone cannot resolve the mixed-revision state?
35275 reputation · 25 Oct 2025, 20:58 UTC
No. svn cleanup removes stale locks and may resume some incomplete operations, but it does not guarantee that every file and directory in the working copy shares a single base revision after an interrupted update. A follow-up svn update (or svn update -r REV for a specific revision) is required to bring the working copy to a uniform revision.
An interrupted svn update can leave the SQLite wc.db with entries at different base revisions. svn cleanup is designed to clear locks and finish certain metadata-only operations; it does not contact the repository to fetch missing changes or to align revisions across the tree.
svn update preserves uncommitted local changes by merging incoming repository changes into them. Overlapping changes are reported as conflicts (marked C in svn status) rather than silently overwritten. However, unresolved conflicts, obstructed nodes, or missing pristine files can prevent the update from completing cleanly.
.svn/pristine.svn process is running on the working copy.svn cleanup <path> to clear stale locks.svn update <path> to synchronize to HEAD, or svn update -r REV <path> if you need the revision the original update was targeting.svn info -R <path> and svn status <path>: no lock errors, no C, ~, or ! markers, and a consistent Revision across all entries.svn process is active; that can corrupt wc.db.svn help cleanup and svn help update for your installed client version.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.