TSVN merges wrong revisions if working copy folder has mixed revisions

295 views
Skip to first unread message

Tobias Knauss

unread,
Dec 19, 2020, 5:52:32 AM12/19/20
to TortoiseSVN
Dear Stefan,

I found a bug in TSVN which causes wrong revision to be selected for merging.
Here are the steps to reproduce:
1) create a file-based repo with default structure (trunk, branches, tags), rev. 1
2) create a doc01.txt in trunk, insert some content (e.g. 20 lines), commit as rev. 2
3) create the branch branches/b01 from trunk, rev. 3
4) edit branches/b01/doc01.txt, commit as rev. 4
5) edit trunk/doc01.txt, commit as rev. 5
6) merge branches/b01 into trunk.  The merge will select the wrong revisions r1:2.

"svn merge" on the command line:
D:\svn\spielwiese_tks2\trunk>svn merge file:///D:/svn_repos/spielwiese_tks2/branches/b01
will refuse to merge, saying:
svn: E195020: Cannot merge into mixed-revision working copy [1:5]; try updating first
because the trunk folder is still at rev. 1 and the trunk/doc01.txt is at rev. 5.

TSVN obviously does not check for mixed revisions, tries to merge r1:2 and reports a tree conflict then:
tsvn-merge_tks2_conflict-add.png

If I update the trunk folder before starting the merge (which maybe should be done anyway before starting a merge), TSVN and CLI "svn merge" both correctly merge r3:5.

If possible, please add a check for mixed revisions in the target folder of the merge. This should solve the problem, because it would refuse to merge (you may then ask the user to update) just as "svn merge" did.

TortoiseSVN 1.14.99, Build 29042 - 64 Bit -dev, 2020/12/14 17:50:08

Thank you in advance.

Best regards
Tobias Knauss

Stefan

unread,
Dec 19, 2020, 8:45:31 AM12/19/20
to TortoiseSVN
fixed in r29047

Kieren

unread,
Oct 10, 2021, 7:26:28 PM10/10/21
to TortoiseSVN
Is it intended that this change now causes the error when also merging to tag checkouts from trunk? This often comes up even if tags are already updated to the latest revision on the tag.
If intended/not fixable, can we have an option added to the UI for allowmixedrevs during merging?

On Sunday, December 20, 2020 at 2:45:31 AM UTC+13 Stefan wrote:
fixed in r29047

Jeremy Pinson

unread,
Dec 2, 2021, 10:07:40 AM12/2/21
to TortoiseSVN
What @Kieren said.
Reply all
Reply to author
Forward
0 new messages