Julian Foad <julian.foad_at_wandisco.com> writes:
> The only new thing
> that I think we want here is the ability to record 'We don't have change
> C' when C is in our own history; where currently we always assume that
> we DO have each such change.
>
>
>> #!/bin/sh -e
>>
>> svn=svn ; svnadmin=svnadmin ; svnlook=svnlook ; svnmucc=svnmucc
>> repo=repo ; wc=wc ; url=file:///`pwd`/$repo
>> rm -rf $repo $wc
>> $svnadmin create $repo
>>
>> # Create first branch
>> $svn mkdir -mm $url/A
>> $svn co $url/A $wc
>>
>> # Create second branch from first
>> $svn cp -mm $url/A $url/X
>> $svn sw $url/X $wc
>> $svn merge ^/A $wc
>> $svn ci -mm $wc
>>
>> # Change on second branch
>> $svn mkdir -mm $url/X/x
>> R1=`svnlook youngest $repo`
>>
>> # Catchup merge first-to-second
>> $svn sw $url/X $wc
>> $svn merge ^/A $wc
>> $svn ci -mm $wc
>>
>> # Reintegrate merge second-to-first
>> $svn sw $url/A $wc
>> $svn merge --reintegrate ^/X $wc
>> $svn ci -mm $wc
>>
>> # Keep-alive merge first-to-second
>> R=`svnlook youngest $repo`
>> $svn sw $url/X $wc
>> $svn merge --record-only -cr$R ^/A $wc
>> $svn ci -mm $wc
I did try setting svn:mergeinfo here:
svnmucc -mm propset svn:mergeinfo '/A:2-4,6
/X:2-7' $url/X
as that allows the following merge to be recorded, by removing X:4.
I don't think this is practical. Should I record X:7 the current HEAD
or X:8 the HEAD created by the propset? Or X:N for some big N? Or some
sort of symbolic revision? Or some way of just storing the reverse
merges: a "magic" path meaning the current branch followed by a list of
reverse merged revisons, something like ':reverse:4'.
>> # Reverse merge change on second NOT RECORDED
>> $svn sw $url/X $wc
>> $svn merge -c-$R1 ^/X $wc
>> $svn ci -mm $wc
>>
>> # Reverse merge change on first RECORDED
>> $svn sw $url/A $wc
>> $svn merge -c-$R1 ^/X $wc
>> $svn ci -mm $wc
>>
>> # Catchup merge CONFLICT
>> $svn sw $url/X $wc
>> $svn merge ^/A $wc
>>
>
>
--
Philip
Received on 2011-08-31 13:52:14 CEST