You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tim van Halteren <t....@inforay.nl> on 2014/03/06 18:15:03 UTC
SVN 1.8 merge (branch reuse) seems broken when having local mergeinfo
We have a problem with the new 1.8 subversion clients (we use
TortoiseSVN 1.8.5 and SlikSVN 1.8.5). It seems that the new SVN 1.8
feature of being able to keep using your feature branch after
reintegration is not working in some cases.
It is not working when the trunk contains local mergeinfo (Mergeinfo on
files or sub-trees). This may cause a problem for branch reuse after the
reintegrate. This wasn't a problem with 1.7 clients if branch reuse was
done using the 'keep alive dance' (using the record only option).
I have made a script that illustrates this problem from scratch. It can
be run against an empty repository using a 1.8 client.
The script below has 10 steps. Step 1-5 are used to create the starting
situation of having local mergeinfo in the trunk. Steps 6-9 simulate
changes being made to the trunk during the life of a feature branch2.
Step 10 is the failing step which simulates the first step of reuse of
the feature branch after reintegrate.
This is the error in step 10:
svn: E195016: Reintegrate can only be used if revisions 346 through 349
were previously merged from
svn://svn2010/practice/branches/featurebranch2 to the reintegrate
source, but this is not the case:
trunk/file1.txt
Missing ranges: /trunk/file1.txt:347
This is the script. You need to change the subversion URL's to point to
your repository.
I do not understand why this happens. Also the error reports missing
ranges of file1.txt while it seems to be file2.txt that is missing
mergeinfo. While not a solution, deleting the local mergeinfo on
file2.txt in the trunk also seems to fix the problem. This also hints
that the error message is reporting something on the wrong file.
@ECHO OFF
ECHO ------------------------------------------------------------------
ECHO STEP 1: Create a trunk with 2 files
ECHO ------------------------------------------------------------------
svn mkdir -m "Create trunk" svn://svn2010/practice/trunk
svn checkout svn://svn2010/practice/trunk
echo Original file contents created in the trunk. > trunk\file1.txt
echo Original file contents created in the trunk. > trunk\file2.txt
svn add trunk\file1.txt
svn add trunk\file2.txt
svn -m "Added 2 files" commit trunk
ECHO ------------------------------------------------------------------
ECHO STEP 2: Create a copy (feature branch) from the trunk
ECHO ------------------------------------------------------------------
svn mkdir -m "Create branches dir" svn://svn2010/practice/branches
svn copy -m "Create featurebranch1" svn://svn2010/practice/trunk
svn://svn2010/practice/branches/featurebranch1
ECHO ------------------------------------------------------------------
ECHO STEP 3: Modify both files in the feature branch
ECHO ------------------------------------------------------------------
svn checkout svn://svn2010/practice/branches/featurebranch1
echo Additional file contents created in featurebranch1. >>
featurebranch1\file1.txt
echo Additional file contents created in featurebranch1. >>
featurebranch1\file2.txt
svn -m "Modified 2 files in featurebranch1" commit featurebranch1
ECHO ------------------------------------------------------------------
ECHO STEP 4: Merge both files from featurebranch1 to the trunk to
ECHO create local mergeinfo on both files
ECHO ------------------------------------------------------------------
svn update trunk
svn merge svn://svn2010/practice/branches/featurebranch1/file1.txt
trunk/file1.txt
svn merge svn://svn2010/practice/branches/featurebranch1/file2.txt
trunk/file2.txt
svn -m "Merged 2 files from featurebranch1 to trunk" commit trunk
ECHO ------------------------------------------------------------------
ECHO STEP 5: Delete featurebranch2, we only needed it for the
ECHO initial setup
ECHO ------------------------------------------------------------------
svn delete -m "Delete featurebranch1"
svn://svn2010/practice/branches/featurebranch1
ECHO ------------------------------------------------------------------
ECHO STEP 6: This is the start of the problematic scenario
ECHO Create a new featurebranch2 from the trunk and a wc for it
ECHO ------------------------------------------------------------------
svn copy -m "Create featurebranch2" svn://svn2010/practice/trunk
svn://svn2010/practice/branches/featurebranch2
svn checkout svn://svn2010/practice/branches/featurebranch2
ECHO ------------------------------------------------------------------
ECHO STEP 7: Modify the contents of file1.txt in the trunk and leave
ECHO the contents of file2.txt unchanged (this is important)
ECHO ------------------------------------------------------------------
echo Additional file contents created in the trunk. >> trunk\file1.txt
svn -m "Modified file1.txt in the trunk" commit trunk
ECHO ------------------------------------------------------------------
ECHO STEP 8: Sync merge the trunk to featurebranch2
ECHO ------------------------------------------------------------------
svn update featurebranch2
svn merge svn://svn2010/practice/trunk featurebranch2
svn -m "Sync merged the trunk into featurebranch2" commit featurebranch2
ECHO ------------------------------------------------------------------
ECHO STEP 9: Reintegrate featurebranch2 back into the trunk
ECHO ------------------------------------------------------------------
svn update trunk
svn merge svn://svn2010/practice/branches/featurebranch2 trunk
svn -m "Reintegrated featurebranch2 back into the trunk" commit trunk
ECHO ------------------------------------------------------------------
ECHO STEP 10: Try to reuse featurebranch2 after it was reintegrated
ECHO Sync merge it from the trunk. THIS FAILS with SVN 1.8
ECHO ------------------------------------------------------------------
svn update featurebranch2
svn merge svn://svn2010/practice/trunk featurebranch2
Re: SVN 1.8 merge (branch reuse) seems broken when having local mergeinfo
Posted by Tim van Halteren <t....@inforay.nl>.
Thanks for your response.
Being at home right now I tried your script on OS/X which has SVN 1.7.10 on
it and I noticed something interesting. Prior to 1.8 we needed to do a
merge with the --record-only option when we wanted to re-use the branch
(keep alive dance). So I first modified the last script line that caused
the error on SVN 1.8: "svn merge ^/trunk wc" to include the --record-only
option. And merge info on BOTH files was changed. This was the behaviour I
expected and branch re-use was possible.
But I also changed the script back so that it didn't include the
--record-only option like we now should be able to use on SVN 1.8. And the
interesting thing is that now SVN 1.7 also doesn't change the mergeinfo on
file 2.
I would expect the --record-only option to only influence the modification
of the files but don't effect the changes to the mergeinfo thus not
expecting a difference in which mergeinfo was changed.
So if my reasoning isn't flawed it could mean the problem was also in
versions prior to 1.8 but wasn't a problem back then because we always had
to use --record-only when re-using a branch.
By the way I also removed --compatible-version 1.8 because I have 1.7.10 on
OS/X
Thx, Tim
On Thu, Mar 13, 2014 at 9:29 PM, Philip Martin
<ph...@wandisco.com>wrote:
> Tim van Halteren <t....@inforay.nl> writes:
>
> > No replies? Is this a bug or user error? Do I need to file a bug?
> > Could I have done something differently to increase the chance of a
> response?
>
> I can reproduce it with trunk. This is my Unix version of your script:
>
> #!/bin/sh
>
> rm -rf repo wc
> svnadmin create repo --compatible-version 1.8
> url=file://`pwd`/repo
> svn mkdir -mm $url/trunk
> svn co $url/trunk wc
> echo t >> wc/f1
> echo t >> wc/f2
> svn add wc/f?
> svn ci -mm wc
> svn cp -mm $url/trunk ^/fb1
> svn sw ^/fb1 wc
> echo fb1 >> wc/f1
> echo fb1 >> wc/f2
> svn ci -mm wc
> svn sw ^/trunk wc
> svn merge ^/fb1/f1 wc/f1
> svn merge ^/fb1/f2 wc/f2
> svn ci -mm wc
> svn rm -mm $url/fb1
> svn cp -mm $url/trunk ^/fb2
> svn sw ^/trunk wc
> echo t >> wc/f1
> svn ci -mm wc
> svn sw ^/fb2 wc
> svn merge ^/trunk wc # problem merge?
> svn ci -mm wc
> svn sw ^/trunk wc
> svn merge ^/fb2 wc
> svn ci -mm wc
> svn sw ^/fb2 wc
>
> The command:
>
> $ svn merge ^/trunk wc
>
> gives the error:
>
> svn: E195016: Reintegrate can only be used if revisions 7 through 10
> were previously merged from file:///home/pm/sw/subversion/obj/repo/fb2 to
> the reintegrate source, but this is not the case:
> trunk/f1
> Missing ranges: /trunk/f1:8
>
> Look at the earlier merge from trunk to fb2:
>
> $ svn merge ^/trunk wc
> --- Merging r7 through r8 into 'wc':
> U wc/f1
> --- Recording mergeinfo for merge of r7 through r8 into 'wc':
> U wc
> --- Recording mergeinfo for merge of r7 through r8 into 'wc/f1':
> U wc/f1
>
> That merge doesn't change wc/f2 and so the subtree mergeinfo there is
> not modified. As I recall that was a deliberate change several years
> ago but I'm not sure exactly how it is supposed to interact with the
> rest of the merge code.
>
> --
> Philip Martin | Subversion Committer
> WANdisco // *Non-Stop Data*
>
Re: SVN 1.8 merge (branch reuse) seems broken when having local mergeinfo
Posted by Philip Martin <ph...@wandisco.com>.
I've written a regression test and raised
http://subversion.tigris.org/issues/show_bug.cgi?id=4481
Tim van Halteren <t....@inforay.nl> writes:
> I'm not sure what to do next. Should I report this as a bug?
>
>
>
> On 3/13/2014 9:29 PM, Philip Martin wrote:
>> Tim van Halteren <t....@inforay.nl> writes:
>>
>>> No replies? Is this a bug or user error? Do I need to file a bug?
>>> Could I have done something differently to increase the chance of a response?
>> I can reproduce it with trunk. This is my Unix version of your script:
>>
>> #!/bin/sh
>>
>> rm -rf repo wc
>> svnadmin create repo --compatible-version 1.8
>> url=file://`pwd`/repo
>> svn mkdir -mm $url/trunk
>> svn co $url/trunk wc
>> echo t >> wc/f1
>> echo t >> wc/f2
>> svn add wc/f?
>> svn ci -mm wc
>> svn cp -mm $url/trunk ^/fb1
>> svn sw ^/fb1 wc
>> echo fb1 >> wc/f1
>> echo fb1 >> wc/f2
>> svn ci -mm wc
>> svn sw ^/trunk wc
>> svn merge ^/fb1/f1 wc/f1
>> svn merge ^/fb1/f2 wc/f2
>> svn ci -mm wc
>> svn rm -mm $url/fb1
>> svn cp -mm $url/trunk ^/fb2
>> svn sw ^/trunk wc
>> echo t >> wc/f1
>> svn ci -mm wc
>> svn sw ^/fb2 wc
>> svn merge ^/trunk wc # problem merge?
>> svn ci -mm wc
>> svn sw ^/trunk wc
>> svn merge ^/fb2 wc
>> svn ci -mm wc
>> svn sw ^/fb2 wc
>>
>> The command:
>>
>> $ svn merge ^/trunk wc
>>
>> gives the error:
>>
>> svn: E195016: Reintegrate can only be used if revisions 7 through 10 were previously merged from file:///home/pm/sw/subversion/obj/repo/fb2 to the reintegrate source, but this is not the case:
>> trunk/f1
>> Missing ranges: /trunk/f1:8
>>
>> Look at the earlier merge from trunk to fb2:
>>
>> $ svn merge ^/trunk wc
>> --- Merging r7 through r8 into 'wc':
>> U wc/f1
>> --- Recording mergeinfo for merge of r7 through r8 into 'wc':
>> U wc
>> --- Recording mergeinfo for merge of r7 through r8 into 'wc/f1':
>> U wc/f1
>>
>> That merge doesn't change wc/f2 and so the subtree mergeinfo there is
>> not modified. As I recall that was a deliberate change several years
>> ago but I'm not sure exactly how it is supposed to interact with the
>> rest of the merge code.
>>
>
--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Re: SVN 1.8 merge (branch reuse) seems broken when having local mergeinfo
Posted by Tim van Halteren <t....@inforay.nl>.
I'm not sure what to do next. Should I report this as a bug?
On 3/13/2014 9:29 PM, Philip Martin wrote:
> Tim van Halteren <t....@inforay.nl> writes:
>
>> No replies? Is this a bug or user error? Do I need to file a bug?
>> Could I have done something differently to increase the chance of a response?
> I can reproduce it with trunk. This is my Unix version of your script:
>
> #!/bin/sh
>
> rm -rf repo wc
> svnadmin create repo --compatible-version 1.8
> url=file://`pwd`/repo
> svn mkdir -mm $url/trunk
> svn co $url/trunk wc
> echo t >> wc/f1
> echo t >> wc/f2
> svn add wc/f?
> svn ci -mm wc
> svn cp -mm $url/trunk ^/fb1
> svn sw ^/fb1 wc
> echo fb1 >> wc/f1
> echo fb1 >> wc/f2
> svn ci -mm wc
> svn sw ^/trunk wc
> svn merge ^/fb1/f1 wc/f1
> svn merge ^/fb1/f2 wc/f2
> svn ci -mm wc
> svn rm -mm $url/fb1
> svn cp -mm $url/trunk ^/fb2
> svn sw ^/trunk wc
> echo t >> wc/f1
> svn ci -mm wc
> svn sw ^/fb2 wc
> svn merge ^/trunk wc # problem merge?
> svn ci -mm wc
> svn sw ^/trunk wc
> svn merge ^/fb2 wc
> svn ci -mm wc
> svn sw ^/fb2 wc
>
> The command:
>
> $ svn merge ^/trunk wc
>
> gives the error:
>
> svn: E195016: Reintegrate can only be used if revisions 7 through 10 were previously merged from file:///home/pm/sw/subversion/obj/repo/fb2 to the reintegrate source, but this is not the case:
> trunk/f1
> Missing ranges: /trunk/f1:8
>
> Look at the earlier merge from trunk to fb2:
>
> $ svn merge ^/trunk wc
> --- Merging r7 through r8 into 'wc':
> U wc/f1
> --- Recording mergeinfo for merge of r7 through r8 into 'wc':
> U wc
> --- Recording mergeinfo for merge of r7 through r8 into 'wc/f1':
> U wc/f1
>
> That merge doesn't change wc/f2 and so the subtree mergeinfo there is
> not modified. As I recall that was a deliberate change several years
> ago but I'm not sure exactly how it is supposed to interact with the
> rest of the merge code.
>
Re: SVN 1.8 merge (branch reuse) seems broken when having local mergeinfo
Posted by Philip Martin <ph...@wandisco.com>.
Tim van Halteren <t....@inforay.nl> writes:
> No replies? Is this a bug or user error? Do I need to file a bug?
> Could I have done something differently to increase the chance of a response?
I can reproduce it with trunk. This is my Unix version of your script:
#!/bin/sh
rm -rf repo wc
svnadmin create repo --compatible-version 1.8
url=file://`pwd`/repo
svn mkdir -mm $url/trunk
svn co $url/trunk wc
echo t >> wc/f1
echo t >> wc/f2
svn add wc/f?
svn ci -mm wc
svn cp -mm $url/trunk ^/fb1
svn sw ^/fb1 wc
echo fb1 >> wc/f1
echo fb1 >> wc/f2
svn ci -mm wc
svn sw ^/trunk wc
svn merge ^/fb1/f1 wc/f1
svn merge ^/fb1/f2 wc/f2
svn ci -mm wc
svn rm -mm $url/fb1
svn cp -mm $url/trunk ^/fb2
svn sw ^/trunk wc
echo t >> wc/f1
svn ci -mm wc
svn sw ^/fb2 wc
svn merge ^/trunk wc # problem merge?
svn ci -mm wc
svn sw ^/trunk wc
svn merge ^/fb2 wc
svn ci -mm wc
svn sw ^/fb2 wc
The command:
$ svn merge ^/trunk wc
gives the error:
svn: E195016: Reintegrate can only be used if revisions 7 through 10 were previously merged from file:///home/pm/sw/subversion/obj/repo/fb2 to the reintegrate source, but this is not the case:
trunk/f1
Missing ranges: /trunk/f1:8
Look at the earlier merge from trunk to fb2:
$ svn merge ^/trunk wc
--- Merging r7 through r8 into 'wc':
U wc/f1
--- Recording mergeinfo for merge of r7 through r8 into 'wc':
U wc
--- Recording mergeinfo for merge of r7 through r8 into 'wc/f1':
U wc/f1
That merge doesn't change wc/f2 and so the subtree mergeinfo there is
not modified. As I recall that was a deliberate change several years
ago but I'm not sure exactly how it is supposed to interact with the
rest of the merge code.
--
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Re: SVN 1.8 merge (branch reuse) seems broken when having local mergeinfo
Posted by Tim van Halteren <t....@inforay.nl>.
No replies? Is this a bug or user error? Do I need to file a bug?
Could I have done something differently to increase the chance of a
response?
Thx, Tim
On 3/6/2014 6:15 PM, Tim van Halteren wrote:
> We have a problem with the new 1.8 subversion clients (we use
> TortoiseSVN 1.8.5 and SlikSVN 1.8.5). It seems that the new SVN 1.8
> feature of being able to keep using your feature branch after
> reintegration is not working in some cases.
>
> It is not working when the trunk contains local mergeinfo (Mergeinfo
> on files or sub-trees). This may cause a problem for branch reuse
> after the reintegrate. This wasn't a problem with 1.7 clients if
> branch reuse was done using the 'keep alive dance' (using the record
> only option).
>
> I have made a script that illustrates this problem from scratch. It
> can be run against an empty repository using a 1.8 client.
>
> The script below has 10 steps. Step 1-5 are used to create the
> starting situation of having local mergeinfo in the trunk. Steps 6-9
> simulate changes being made to the trunk during the life of a feature
> branch2. Step 10 is the failing step which simulates the first step of
> reuse of the feature branch after reintegrate.
>
>
> This is the error in step 10:
>
> svn: E195016: Reintegrate can only be used if revisions 346 through
> 349 were previously merged from
> svn://svn2010/practice/branches/featurebranch2 to the reintegrate
> source, but this is not the case:
> trunk/file1.txt
> Missing ranges: /trunk/file1.txt:347
> This is the script. You need to change the subversion URL's to point
> to your repository.
>
>
> I do not understand why this happens. Also the error reports missing
> ranges of file1.txt while it seems to be file2.txt that is missing
> mergeinfo. While not a solution, deleting the local mergeinfo on
> file2.txt in the trunk also seems to fix the problem. This also hints
> that the error message is reporting something on the wrong file.
>
>
>
> @ECHO OFF
> ECHO ------------------------------------------------------------------
> ECHO STEP 1: Create a trunk with 2 files
> ECHO ------------------------------------------------------------------
> svn mkdir -m "Create trunk" svn://svn2010/practice/trunk
> svn checkout svn://svn2010/practice/trunk
> echo Original file contents created in the trunk. > trunk\file1.txt
> echo Original file contents created in the trunk. > trunk\file2.txt
> svn add trunk\file1.txt
> svn add trunk\file2.txt
> svn -m "Added 2 files" commit trunk
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 2: Create a copy (feature branch) from the trunk
> ECHO ------------------------------------------------------------------
> svn mkdir -m "Create branches dir" svn://svn2010/practice/branches
> svn copy -m "Create featurebranch1" svn://svn2010/practice/trunk
> svn://svn2010/practice/branches/featurebranch1
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 3: Modify both files in the feature branch
> ECHO ------------------------------------------------------------------
> svn checkout svn://svn2010/practice/branches/featurebranch1
> echo Additional file contents created in featurebranch1. >>
> featurebranch1\file1.txt
> echo Additional file contents created in featurebranch1. >>
> featurebranch1\file2.txt
> svn -m "Modified 2 files in featurebranch1" commit featurebranch1
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 4: Merge both files from featurebranch1 to the trunk to
> ECHO create local mergeinfo on both files
> ECHO ------------------------------------------------------------------
> svn update trunk
> svn merge svn://svn2010/practice/branches/featurebranch1/file1.txt
> trunk/file1.txt
> svn merge svn://svn2010/practice/branches/featurebranch1/file2.txt
> trunk/file2.txt
> svn -m "Merged 2 files from featurebranch1 to trunk" commit trunk
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 5: Delete featurebranch2, we only needed it for the
> ECHO initial setup
> ECHO ------------------------------------------------------------------
> svn delete -m "Delete featurebranch1"
> svn://svn2010/practice/branches/featurebranch1
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 6: This is the start of the problematic scenario
> ECHO Create a new featurebranch2 from the trunk and a wc for it
> ECHO ------------------------------------------------------------------
> svn copy -m "Create featurebranch2" svn://svn2010/practice/trunk
> svn://svn2010/practice/branches/featurebranch2
> svn checkout svn://svn2010/practice/branches/featurebranch2
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 7: Modify the contents of file1.txt in the trunk and leave
> ECHO the contents of file2.txt unchanged (this is important)
> ECHO ------------------------------------------------------------------
> echo Additional file contents created in the trunk. >> trunk\file1.txt
> svn -m "Modified file1.txt in the trunk" commit trunk
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 8: Sync merge the trunk to featurebranch2
> ECHO ------------------------------------------------------------------
> svn update featurebranch2
> svn merge svn://svn2010/practice/trunk featurebranch2
> svn -m "Sync merged the trunk into featurebranch2" commit featurebranch2
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 9: Reintegrate featurebranch2 back into the trunk
> ECHO ------------------------------------------------------------------
> svn update trunk
> svn merge svn://svn2010/practice/branches/featurebranch2 trunk
> svn -m "Reintegrated featurebranch2 back into the trunk" commit trunk
>
> ECHO ------------------------------------------------------------------
> ECHO STEP 10: Try to reuse featurebranch2 after it was reintegrated
> ECHO Sync merge it from the trunk. THIS FAILS with SVN 1.8
> ECHO ------------------------------------------------------------------
> svn update featurebranch2
> svn merge svn://svn2010/practice/trunk featurebranch2
>