I will try to describe the "scenery", but I have also attached a Windows batch file that creates a repository ("repos") and a work folder ("work"), as well as the log file ("log.txt") described below. I have also attached my copy of "log.txt".
This is in short was the batch file does: A branch is created from trunk, and changes are made in the branch (but NO CHANGE is made in the trunk). This branch is then merge into trunk. A second branch is then created, but now there are changes made in both trunk and branch. This branch is also merged into trunk. Now there are of cause conflicts, but all changes are saved (trunk first, then branch) So now to the actual problem. Showing the log on the file, with: "svn log --use-merge-history --verbose trunk\example.txt It shows (as expected) each change made in the second branch, but NOT each change made in the first branch !?!?! ...and the file does include all the changes, but why isn't it listed in the log? I am expecting to see r3, r4 and r5, (just like r9, r10 and r12 for the second branch) but they are NOT listed in the log, see attached file "log.txt" BTW, I'm using svn, version 1.9.3 (r1718519) Is this a bug or am I doing it wrong? /Stefan
@echo off if exist repos ( echo Repository "repos" already exist in current directory, aborting... goto:QUIT_PAUSE ) if exist work ( echo Work folder "work" already exist in current directory, aborting... goto:QUIT_PAUSE ) echo :: Create a new repository svnadmin create repos echo :: Check out a work copy call:PathToURL repos URL svn checkout %URL% work echo :: Create the folder structure and create the file mkdir work\branches mkdir work\tags mkdir work\trunk echo Creation > work\trunk\example.txt svn add work\branches svn add work\tags svn add work\trunk svn commit work --message "Creation" svn update work call:AddTextIn "trunk" "Change A" call:CreateBranch "branch1" call:AddTextIn "branches\branch1" "Change B" call:AddTextIn "branches\branch1" "Change C" call:MergeBranchToTrunk "branch1" call:AddTextIn "trunk" "Change D" call:AddTextIn "trunk" "Change E" call:CreateBranch "branch2" call:AddTextIn "branches\branch2" "Change F" call:AddTextIn "trunk" "Change G" call:AddTextIn "branches\branch2" "Change H" call:AddTextIn "trunk" "Change I" echo. echo There will be a merge conflict, so when asked: echo 1. Answer "m" (for merge) echo 2. Answer "12" (for their version first, then yours) echo 3. Answer "r" (for mark as resolved) echo. @timeout /t 5 call:MergeBranchToTrunk "branch2" call:AddTextIn "trunk" "Change J" svn log --use-merge-history --verbose work\trunk\example.txt > log.txt GOTO:QUIT_TIMEOUT ::============================================================================= ::-- Function section starts below... ::============================================================================= :PathToURL -- Converts a path to an URL :: -- %~1: File/directory path :: -- %~2: Variable for resulting URL SETLOCAL :: Copy argument into local variable for easy reading set PATH_NAME=%~1 :: Make sure that we start with an empty URL set PATH_URL= :: Expand the relative path to an absolute one for /f "delims=" %%R in ("%PATH_NAME%") do set PATH_URL=%%~fR% :: Prepend "file:///" set PATH_URL=file:///%PATH_URL% :: Handles the special case of a UNC path set PATH_URL=%PATH_URL:///\\=//% :: Make sure to only use forward slashes set PATH_URL=%PATH_URL:\=/% :: Return result (ENDLOCAL SET %~2=%PATH_URL% ) GOTO:EOF ::============================================================================= :AddTextIn :: -- %~1: Trunk/branch :: -- %~2: Change text echo :: Make %~2 in %~1 echo %~2 >> work\%~1\example.txt svn commit work --message "%~2" svn update work GOTO:EOF ::============================================================================= :CreateBranch :: -- %~1: Branch echo :: Create %~1 svn copy work\trunk work\branches\%~1 svn commit work --message "Creating %~1" svn update work GOTO:EOF ::============================================================================= :MergeBranchToTrunk :: -- %~1: Branch echo :: Merge %~1 to trunk cd work\trunk svn merge ..\branches\%~1 cd ..\.. svn commit work --message "Merge %~1 to trunk" svn update work GOTO:EOF ::============================================================================= :QUIT_PAUSE @pause "Press ENTER to close window" GOTO:EOF ::============================================================================= :QUIT_TIMEOUT @timeout /t 5 GOTO:EOF ::=============================================================================
------------------------------------------------------------------------ r15 | Stefan | 2016-03-06 18:45:53 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk/example.txt Change J ------------------------------------------------------------------------ r14 | Stefan | 2016-03-06 18:45:53 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk M /trunk/example.txt Merge branch2 to trunk ------------------------------------------------------------------------ r12 | Stefan | 2016-03-06 18:45:39 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /branches/branch2/example.txt Merged via: r14 Change H ------------------------------------------------------------------------ r10 | Stefan | 2016-03-06 18:45:38 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /branches/branch2/example.txt Merged via: r14 Change F ------------------------------------------------------------------------ r9 | Stefan | 2016-03-06 18:45:37 +0100 (sön, 06 mar 2016) | 1 line Changed paths: A /branches/branch2 (from /trunk:8) Merged via: r14 Creating branch2 ------------------------------------------------------------------------ r13 | Stefan | 2016-03-06 18:45:40 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk/example.txt Change I ------------------------------------------------------------------------ r11 | Stefan | 2016-03-06 18:45:38 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk/example.txt Change G ------------------------------------------------------------------------ r8 | Stefan | 2016-03-06 18:45:36 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk/example.txt Change E ------------------------------------------------------------------------ r7 | Stefan | 2016-03-06 18:45:35 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk/example.txt Change D ------------------------------------------------------------------------ r6 | Stefan | 2016-03-06 18:45:35 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk M /trunk/example.txt Merge branch1 to trunk ------------------------------------------------------------------------ r2 | Stefan | 2016-03-06 18:45:32 +0100 (sön, 06 mar 2016) | 1 line Changed paths: M /trunk/example.txt Change A ------------------------------------------------------------------------ r1 | Stefan | 2016-03-06 18:45:31 +0100 (sön, 06 mar 2016) | 1 line Changed paths: A /branches A /tags A /trunk A /trunk/example.txt Creation ------------------------------------------------------------------------