svntortoisesvnrevert

Resolve "Can't revert 'somedir' without reverting children" when reverting in svn


Sometimes (especially when reverting a merge), Subversion gives me an error while reverting all changes:

Can't revert 'path/to/folder' without reverting children

Using Tortoise Cleanup with all boxes checked still gives the same error.

How do I resolve this error?


Solution

  • Command Line

    On a question about a similar error: SVN Can't revert 'mydir' without reverting parent, a comment from Albert Hendriks gives a command-line solution:

    svn revert path/to/folder --depth infinity 
    

    (Where path/to/folder can be the path to your problematic folder or the root of the checkout.)


    TortoiseSVN

    While "Revert all changes recursively" in the Cleanup dialog doesn't work, using the Revert command does work:

    1. Right click the folder > TortoiseSVN > Revert...
    2. The Revert dialog will open.
    3. Check "Select / deselect All" so all the checkboxes are checked. This appears to work the same as recursive revert.

    Usually the "without reverting children" error occurs while reverting from the Commit or Modifications window. While in both cases you're selecting all modified files and reverting, they have different results!

    TortoiseSVN Revert