Unfixable mixed-revision working copy in SVN
Asked Answered
S

5

22

I have a branch checkout that is clean (no modifications), but I cannot reintegrate the trunk back into my branch, because SVN thinks I have a mixed-revision working copy:

c:\myproject> svnversion
2045:2047

The problem seems to be caused by one of my externals:

c:\myproject> svn propget svn:externals tools
-r1448 ^/tools/external/trunk/gandalf/bin gandalf/bin
-r1508 ^/tools/external/trunk/gandalf/include gandalf/include
-r1508 ^/tools/external/trunk/gandalf/lib gandalf/lib
-r1428 ^/tools/external/trunk/jsdb jsdb
-r2045 ^/tools/external/trunk/java/lib/jing.jar jing.jar

You will note that all of them are directory externals rather than single-file externals, except for jing.jar, which is the same version as what "svnversion" thinks is the lowest range of my working copy, which is supposed to be a clean checkout of r2047.

How do I fix this (besides not using the single-file external)?

I've tried doing updates, fresh checkouts, and svn cleanup, and it still has this problem. I'm using TortoiseSVN 1.6.12

Saundrasaunter answered 18/2, 2011 at 20:15 Comment(0)
L
24

Looks like you're not the only one with this problem.

The fix is to use the equivalent of svn update --ignore-externals

See here: Reintegrate a branch with externals fails in SVN

Loudmouthed answered 25/2, 2011 at 2:1 Comment(1)
Thanks, run svn update simply worked for mePedropedrotti
I
7

I came to a different solution, --allow-mixed-revisions:

svn merge -c7777 https://repo/app/branches/1.0 . --allow-mixed-revisions

Ignoring externals when updating didn't fix the problem for me even if I did a completely fresh checkout.

Inopportune answered 1/8, 2016 at 4:20 Comment(0)
F
2

Note that this issue has been fixed since Subversion 1.7.0. Since then svnversion (and the merge logic) ignore file externals when determining the revisions.

Fickle answered 31/3, 2015 at 10:15 Comment(1)
I actually have the very same problem with svn 1.8.11.Flatwise
I
1

Even immediately after updating/pushing my entire repository, I got this error message just for trying to rename a folder. Updating the folder again right before renaming fixed this issue for me.

Inventive answered 6/2, 2019 at 17:43 Comment(0)
R
0

Same problem, my FIX relates to Best answer (but I used switch command instead of update with no externals).

I describe how to fix it with Eclipse subversion.

enter image description here

Error in console

merge --dry-run --depth=infinity --force --ignore-ancestry -r133880:133881 svn+ssh://{svnPath} {localPath}
    svn: E195020: Cannot merge into mixed-revision working copy [133 963:133 967]; try updating first
    svn: E195020: Cannot merge into mixed-revision working copy [133 963:133 967]; try updating first
    Dry-run merge completed abnormally.

I first refreshed (Team > Switch) my local branch with Ignore externals option

enter image description here

Output in console:

switch svn+ssh://{svnPath} {localPath} -r HEAD --depth=infinity --ignore-externals --force

Then, the merge or its dry run were successful.

merge --dry-run --depth=infinity -r133880:133881 svn+ssh://{svnPath} {localPath}
Dry-run merge complete.
    ===== File Statistics: =====
    Updated: 5

Complete before/after output in console:

merge --depth=infinity -r133956:133957 svn+ssh://{svnPath} {localPath}
    svn: E195020: Cannot merge into mixed-revision working copy [133 970:133 971]; try updating first
    svn: E195020: Cannot merge into mixed-revision working copy [133 970:133 971]; try updating first
    Merge completed abnormally.
switch svn+ssh://{svnPath} {localPath} -r HEAD --ignore-externals --force
    At revision 133971.
merge --depth=infinity -r133956:133957 svn+ssh://{svnPath} {localPath}
    --- Merging r133956 through r133957 into {localPath}
    U   {localPath}/index.html
    Merge info recorded for {localPath}
    Merge complete.
    ===== File Statistics: =====
    Updated: 1
    ==== Property Statistics: =====
    Updated: 1

Inspired by:

Ruttger answered 13/4, 2022 at 15:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.