[PATCH] Empty message box when applying a patch that does not affect any files

32 views
Skip to first unread message

Denis Kovalchuk

unread,
Feb 9, 2022, 5:57:47 PM2/9/22
to TortoiseSVN-dev
Hello!

Steps to reproduce:
1. Download the empty.patch from attachments.
2. Open TortoiseMerge.exe.
3. Enter the path to the empty.patch.
4. Enter the path to any working copy.
5. Click "OK".

The same behavior if you try to apply any file that is not a patch. It looks
like if the applied file does not affect any files, then it is considered an
error (see line 782 in TortoiseMerge/MainFrm.cpp [1]). But SVNPatch::Init() [2]
does not set an error message in this case.

What do you think if this case is not treated as an error? I've attached a
patch.

[1] https://osdn.net/projects/tortoisesvn/scm/svn/blobs/head/trunk/src/TortoiseMerge/MainFrm.cpp
[2] https://osdn.net/projects/tortoisesvn/scm/svn/blobs/head/trunk/src/SVN/SVNPatch.cpp

Best Regards,
Denis Kovalchuk
fix-empty-message-box.patch.txt
TortoiseMerge-empty-message-box.png
Message has been deleted
Message has been deleted
Message has been deleted

Denis Kovalchuk

unread,
Feb 10, 2022, 5:08:01 AM2/10/22
to TortoiseSVN-dev
Sorry I missed the empty.patch.txt.

Denis Kovalchuk

unread,
Feb 10, 2022, 5:09:36 AM2/10/22
to TortoiseSVN-dev
It looks like there is no way to attach an empty file to an email. Use the
test.patch.txt to reproduce the problem.
test.patch.txt

Stefan

unread,
Feb 12, 2022, 2:13:20 AM2/12/22
to TortoiseSVN-dev
thanks for your patch!
committed in r29353
Reply all
Reply to author
Forward
0 new messages