Hi,
running the attached test script brings up the following error:
"E195016: Reintegrate can only be used if revisions 2 through 8 were
previously merged from [branchURL] to the reintegrate source, but this
is not the case:
trunk
Missing ranges: branches/A:2,5"
The weird thing here (at least weird in my understanding) is that it
tries to do a reintegration merge even though I'm trying to perform a
catach-up merge with trunk on the branch.
Looking at merge.c at line 12462 the following if-check determines it's
a "reintegrate-like" merge and therefore tries to do a reintegration
merge, instead of a "normal" merge:
if (base_on_source->rev >= base_on_target->rev)
base_on_source->rev = 3
base_on_target->rev = 4
I'm wondering whether this if-check suffices here to determine whether
it is a reintegration merge or not, given my test-scenario which has
cherry-picked revisions in both directions (trunk <-> branch).
To me it looks like the check relies on cherry-picking only being
performed in one or the other direction, because otherwise the
"youngest-complete-synced-point" couldn't be used to determine the
direction for reintegration merges...
Or am I missing something?
Sorry if I'm completely off here --- not too familiar with all the
details of the automerge and it's twisiting my brain trying to
follow/interpret the design details from code.
--
Regards,
Stefan Hett
@echo off
set TESTDIR=C:/[delete]SVN/maxSVN1.7
REM clean-up
rmdir repository /S /Q
rmdir wc /S /Q
REM create repository
mkdir repository
svnadmin create repository
REM create WC
mkdir wc
svn co file:///%TESTDIR%/repository wc
cd wc
REM set-up trunk-branches structure
mkdir trunk
mkdir branches
svn add trunk
svn add branches
svn ci -m "Added branch structure"
REM rev 1
REM testcase
svn cp trunk branches/A
svn ci -m "added branch"
REM rev 2
echo "foo" >trunk\file.txt
svn add trunk\file.txt
svn ci -m "added file.txt"
REM rev 3
echo "foo2" >>trunk\file.txt
svn ci -m "modified file.txt"
REM rev 4
svn merge -r 2:3 file:///%TESTDIR%/repository/trunk branches/A
svn ci -m "merged trunk r3 into branch"
REM rev 5
echo "foo3" >branches\A\file2.txt
svn add branches/A/file2.txt
svn ci -m "added file2.txt"
REM rev 6
echo "foo4" >>trunk\file.txt
svn ci -m "modified file.txt again"
REM rev 7
svn up
svn merge -r 5:6 file:///%TESTDIR%/repository/branches/A trunk
svn ci -m "merged branch r6 into trunk"
REM rev 8
svn merge file:///%TESTDIR%/repository/trunk branches/A
cd ..
REM svn: E195016: Reintegrate can only be used if revisions 2 through 8 were
previously merged from [branchURL] to the reintegrate source, but this is not
the case:
REM trunk
REM Missing ranges: branches/A:2,5