svn --version @if exist repo rd /q/s repo @if exist wc rd /q/s wc svnadmin create repo md wc set REPOS=file:///%~dp0repo set REPOS=%REPOS:\=/% svn co %REPOS% wc md wc\trunk md wc\branch echo sample >> wc\trunk\sample.txt echo sample >> wc\branch\sample.txt svn add wc\trunk wc\branch svn ci wc -m"1" echo sample >> wc\branch\sample.txt svn ci wc -m"2" svn merge %REPOS%/branch@1 %REPOS%/branch@2 wc\trunk svn ci wc -m"3" svn cat %REPOS%/trunk/sample.txt svn rm wc/branch/sample.txt svn ci wc -m"4" svn merge %REPOS%/branch@3 %REPOS%/branch@4 wc\trunk @if exist wc\trunk\sample.txt echo ***** file should be gone svn revert wc\trunk\sample.txt echo sample >> wc\trunk\sample.txt svn merge %REPOS%/branch@3 %REPOS%/branch@4 wc\trunk @if not exist wc\trunk\sample.txt echo ***** file with mods should stay svn ci wc -m"5" echo sample >> wc\trunk\sample.txt svn merge --force --dry-run %REPOS%/branch@3 %REPOS%/branch@4 wc\trunk @if not exist wc\trunk\sample.txt echo ***** file should stay svn merge --force %REPOS%/branch@3 %REPOS%/branch@4 wc\trunk svn ci wc -m"6" @if exist wc\trunk\sample.txt echo ***** file should be gone