@echo ** This will create a repo at c:\tmpsample\repo and a wc at c:\tmpsample\wc c: cd \ mkdir tmpsample cd tmpsample svnadmin create repo svn mkdir file:///c:/tmpsample/repo/trunk file:///c:/tmpsample/repo/branches file:///c:/tmpsample/repo/tags -m "r1" mkdir wc cd wc svn co file:///c:/tmpsample/repo/trunk . pause @echo ** This will create a "base program" and commit it echo test > fil1 svn add fil1 echo test > fil2 svn add fil2 echo test > fil3 svn add fil3 svn commit . -m "r2" pause @echo ** These are changes for a new version of our program echo moretest_r3 >> fil1 echo moretest_r3 >> fil2 svn commit . -m "r3" pause @echo ** These are some files needed for a bugfix (the bug was present at r2 and r3) svn mkdir fol1 echo test > fol1/fil4 svn add fol1/fil4 svn mkdir fol1/fol2 echo test > fol1/fol2/fil5 svn add fol1/fol2/fil5 echo moretest_r4 >> fil3 svn commit . -m "r4 - this is a bugfix" pause @echo ** Our customer says he wants r2+bugfix, so do and place it in a new branch svn up . -r 2 svn merge -r 3:4 file:///c:/tmpsample/repo/trunk . svn copy . file:///c:/tmpsample/repo/branches/r2_fixed -m "r5 - r2+fix" pause @echo ** Try to switch to that branch: IT WON'T WORK!!!! svn switch file:///c:/tmpsample/repo/branches/r2_fixed . rem !!! svn: Failed to add directory 'fol1': object of the same name already exists pause @echo ** Now, let's try to fix our wc in any way: @echo ** Updating... svn up @rem U fil1 @rem U fil2 @rem G fil3 @rem svn: Failed to add directory 'fol1': object of the same name already exists pause @echo ** Or reverting... svn revert . svn up @rem svn: Failed to add directory 'fol1': object of the same name already exists pause @echo ** Or removing fol1 from wc via rmdir and updating rmdir /s /q fol1 svn up @rem svn: Failed to add directory 'fol1': object of the same name is already scheduled for addition pause @echo ** We give up. Cleaning up... cd \ rmdir c:\tmpsample /s /q