From e7d781f43aa7774739f157df7a92cd7126d69c82 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 25 Apr 2024 18:23:03 +0200 Subject: [PATCH] fix(subversion): Make the peg revision newer than the operative revision Ensure that always the first algorithm mentioned at [1] is applied. This avoids errors e.g. when updating to a resolved revision of a tag path. Fixes #6160. [1]: https://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html Signed-off-by: Sebastian Schuberth --- .../subversion/src/main/kotlin/Subversion.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/version-control-systems/subversion/src/main/kotlin/Subversion.kt b/plugins/version-control-systems/subversion/src/main/kotlin/Subversion.kt index 76756b6612113..5a4a217fb32f8 100644 --- a/plugins/version-control-systems/subversion/src/main/kotlin/Subversion.kt +++ b/plugins/version-control-systems/subversion/src/main/kotlin/Subversion.kt @@ -147,11 +147,12 @@ class Subversion : VersionControlSystem() { "Switching $type '${workingTree.workingDir}' to $svnUrl at revision $printableRevision." } + // For "peg revision" vs. "revision" see https://svnbook.red-bean.com/en/1.7/svn.advanced.pegrevs.html. val workingTreeRevision = clientManager.updateClient.doSwitch( workingTree.workingDir, svnUrl, - svnRevision, - svnRevision, + /* pegRevision = */ SVNRevision.HEAD, + /* revision = */ svnRevision, if (path.isEmpty()) SVNDepth.INFINITY else SVNDepth.EMPTY, /* allowUnversionedObstructions = */ false, /* depthIsSticky = */ true