[PATCH] Fix: applying a patch with file deletions results in these files are missing

143 views
Skip to first unread message

Denis Kovalchuk

unread,
Jan 30, 2022, 11:16:08 AM1/30/22
to TortoiseSVN-dev
Hello.

Steps to reproduce:
1. Create a patch that deletes files.
2. Apply the patch using TortoiseSVN.
3. Use "svn status" to check your working copy state.
4. See that the files are missing, not deleted.

The problem is reproduced in at least TortoiseSVN 1.13 and 1.14.

It looks like a copy-paste typo in r28529 [1]: svn_dirent_canonicalize() calls
have been replaced with svn_uri_canonicalize_safe() instead of
svn_dirent_canonicalize_safe(). As a result, the SVNPatch::RemoveFile()
function fails. It also seems that the SVNPatch::PatchPath() function is
affected by the same problem.

There is a patch with a fix in attachments.

[1] https://osdn.net/projects/tortoisesvn/scm/svn/commits/28529#fd-trunk/src/SVN/SVNPatch.cpp

With best regards,
Denis Kovalchuk
fix-apply-patch-deleted-files-are-missing.patch.txt

Stefan

unread,
Jan 31, 2022, 11:51:24 AM1/31/22
to TortoiseSVN-dev
Thanks!
Committed in r29346 
Reply all
Reply to author
Forward
0 new messages