You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Tobias Schäfer <to...@gmx.de> on 2008/11/15 21:58:56 UTC

Reproduction recipe for "Target path does not exist"

Hi merge fans,

the following simple scenario and reproduction recipe leads to an unexpected 
"Target path does not exist" when merging changes from trunk to a branch

What I did:
1. Develop on trunk
2. Restore a previous state of trunk by deleting trunk and copying a 
previous state as the new trunk
3. Branch (resurrected) trunk
4. Develop on (resurrected) trunk
5. Merge changes from (resurrected) trunk to branch

The critical point is 2. The rest is standard.

What happened:
The error can be reproduced with 1.5.4 on linux and 1.6.0-dev with a self-
compiled svn.exe from trunk (Revision 34217).

Attached are a shell script for linux and a batch file for windows. Both 
trigger the same error:

C:\Development\SVN\TortoiseSVN\ext\subversion\subversion\libsvn_repos\
reporter.c:1162 (apr_err=160005)
svn: Target path does not exist

Attached is also the output of the batch file and a revision graph. These are 
the logs to make it easier to read the revision graph:
Revision 1: created initial structure
Revision 2: some empty file
Revision 3: malicious change
Revision 4: remove trunk
Revision 5: resurrected trunk@2
Revision 6: created 1.0 branch
Revision 7: more trunk changes

What I expected:
In my opinion the merge from trunk to branch should work in this case by 
merging revision 7. Can this be confirmed as a bug?

If the malicious change on trunk had been reverted by a simple reverse 
merge, everything would be fine. On the other hand, deleting trunk and 
resurrecting it should not trigger this error.

Tobias


Re: Reproduction recipe for "Target path does not exist"

Posted by Tobias Schäfer <to...@gmx.de>.
On Tuesday 25 November 2008 04:16:18 Paul Burba wrote:
> On Fri, Nov 21, 2008 at 2:06 PM, Paul Burba <pt...@gmail.com> wrote:
> r34385 - Added a new merge test to replicate this problem.
> r34393 - Fixed the problem.
> r34394 - Nominated for backport to 1.5.x

I can confirm that both the test scenario as well as the original repository 
are now merging correctly.

Thanks Paul.

Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Reproduction recipe for "Target path does not exist"

Posted by Paul Burba <pt...@gmail.com>.
On Fri, Nov 21, 2008 at 2:06 PM, Paul Burba <pt...@gmail.com> wrote:
> On Fri, Nov 21, 2008 at 12:09 PM, Tobias Schäfer <to...@gmx.de> wrote:
>> On Friday 21 November 2008 15:51:44 Julian Foad wrote:
>>> Slightly off-topic, hence top-posting.
>>>
>>> I see this error sometimes. Most recently it was when I tried "svn
>>> switch" to a mis-typed URL. It's annoying because I don't know what
>>> "target" refers to: it could be the URL I gave or the WC path I gave or
>>> some sub-path within the tree.
>>>
>>> I have just committed (r34305) the attach patch which puts the path in
>>> the error message. It works for the "switch" problem above. I haven't
>>> tried it with your scenario. Perhaps you could, if you are able to
>>> re-build the server. (It's a server-side error message.)
>>>
>>> It doesn't fix the problem, of course.
>>
>> I've updated to revision 34311 of Subversion.
>>
>> It now outputs:
>> svn: Target path '/trunk' does not exist
>>
>> This is only true in the state of revision 4 of the reproduction recipe -
>> but should not be relevant as the branch was created in revision 6.
>>
>> As you stated: the problem is not solved by your change.
>
> Tobias,
>
> I think I found the problem.  When we calculate what part of a merge
> source (i.e. merge_source_t) to merge to a WC target we look at the
> target's explicit or inherited mergeinfo and its history (e.g.
> implicit mergeinfo) when deciding what has already been merged and
> what remains to be merged.  In most cases the implicit mergeinfo
> covers a contiguous range, but in your example this is not the case:
>
> Merge target 'branches\1.0':
>
> Explicit or Inherited Mergeinfo:
>
>  None
>
> Implicit Mergeinfo:
>
>  /branches/1.0:6-7
>  /trunk:2,5
>
> It's that gap in the mergeinfo for trunk that is causing the problem.
> We are trying to merge it, which causes the error you see.  We should
> be ignoring it.
>
> Working on a fix right now.

r34385 - Added a new merge test to replicate this problem.
r34393 - Fixed the problem.
r34394 - Nominated for backport to 1.5.x

Paul

Re: Reproduction recipe for "Target path does not exist"

Posted by Paul Burba <pt...@gmail.com>.
On Fri, Nov 21, 2008 at 12:09 PM, Tobias Schäfer <to...@gmx.de> wrote:
> On Friday 21 November 2008 15:51:44 Julian Foad wrote:
>> Slightly off-topic, hence top-posting.
>>
>> I see this error sometimes. Most recently it was when I tried "svn
>> switch" to a mis-typed URL. It's annoying because I don't know what
>> "target" refers to: it could be the URL I gave or the WC path I gave or
>> some sub-path within the tree.
>>
>> I have just committed (r34305) the attach patch which puts the path in
>> the error message. It works for the "switch" problem above. I haven't
>> tried it with your scenario. Perhaps you could, if you are able to
>> re-build the server. (It's a server-side error message.)
>>
>> It doesn't fix the problem, of course.
>
> I've updated to revision 34311 of Subversion.
>
> It now outputs:
> svn: Target path '/trunk' does not exist
>
> This is only true in the state of revision 4 of the reproduction recipe -
> but should not be relevant as the branch was created in revision 6.
>
> As you stated: the problem is not solved by your change.

Tobias,

I think I found the problem.  When we calculate what part of a merge
source (i.e. merge_source_t) to merge to a WC target we look at the
target's explicit or inherited mergeinfo and its history (e.g.
implicit mergeinfo) when deciding what has already been merged and
what remains to be merged.  In most cases the implicit mergeinfo
covers a contiguous range, but in your example this is not the case:

Merge target 'branches\1.0':

Explicit or Inherited Mergeinfo:

  None

Implicit Mergeinfo:

  /branches/1.0:6-7
  /trunk:2,5

It's that gap in the mergeinfo for trunk that is causing the problem.
We are trying to merge it, which causes the error you see.  We should
be ignoring it.

Working on a fix right now.

Paul

Re: Reproduction recipe for "Target path does not exist"

Posted by Tobias Schäfer <to...@gmx.de>.
On Friday 21 November 2008 15:51:44 Julian Foad wrote:
> Slightly off-topic, hence top-posting.
>
> I see this error sometimes. Most recently it was when I tried "svn
> switch" to a mis-typed URL. It's annoying because I don't know what
> "target" refers to: it could be the URL I gave or the WC path I gave or
> some sub-path within the tree.
>
> I have just committed (r34305) the attach patch which puts the path in
> the error message. It works for the "switch" problem above. I haven't
> tried it with your scenario. Perhaps you could, if you are able to
> re-build the server. (It's a server-side error message.)
>
> It doesn't fix the problem, of course.

I've updated to revision 34311 of Subversion.

It now outputs:
svn: Target path '/trunk' does not exist

This is only true in the state of revision 4 of the reproduction recipe - 
but should not be relevant as the branch was created in revision 6.

As you stated: the problem is not solved by your change.

Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Reproduction recipe for "Target path does not exist"

Posted by Julian Foad <ju...@btopenworld.com>.
Slightly off-topic, hence top-posting.

I see this error sometimes. Most recently it was when I tried "svn
switch" to a mis-typed URL. It's annoying because I don't know what
"target" refers to: it could be the URL I gave or the WC path I gave or
some sub-path within the tree.

I have just committed (r34305) the attach patch which puts the path in
the error message. It works for the "switch" problem above. I haven't
tried it with your scenario. Perhaps you could, if you are able to
re-build the server. (It's a server-side error message.)

It doesn't fix the problem, of course.

- Julian


On Sat, 2008-11-15 at 22:58 +0100, Tobias Schäfer wrote:
> Hi merge fans,
> 
> the following simple scenario and reproduction recipe leads to an unexpected 
> "Target path does not exist" when merging changes from trunk to a branch
> 
> What I did:
> 1. Develop on trunk
> 2. Restore a previous state of trunk by deleting trunk and copying a 
> previous state as the new trunk
> 3. Branch (resurrected) trunk
> 4. Develop on (resurrected) trunk
> 5. Merge changes from (resurrected) trunk to branch
> 
> The critical point is 2. The rest is standard.
> 
> What happened:
> The error can be reproduced with 1.5.4 on linux and 1.6.0-dev with a self-
> compiled svn.exe from trunk (Revision 34217).
> 
> Attached are a shell script for linux and a batch file for windows. Both 
> trigger the same error:
> 
> C:\Development\SVN\TortoiseSVN\ext\subversion\subversion\libsvn_repos\
> reporter.c:1162 (apr_err=160005)
> svn: Target path does not exist
> 
> Attached is also the output of the batch file and a revision graph. These are 
> the logs to make it easier to read the revision graph:
> Revision 1: created initial structure
> Revision 2: some empty file
> Revision 3: malicious change
> Revision 4: remove trunk
> Revision 5: resurrected trunk@2
> Revision 6: created 1.0 branch
> Revision 7: more trunk changes
> 
> What I expected:
> In my opinion the merge from trunk to branch should work in this case by 
> merging revision 7. Can this be confirmed as a bug?
> 
> If the malicious change on trunk had been reverted by a simple reverse 
> merge, everything would be fine. On the other hand, deleting trunk and 
> resurrecting it should not trigger this error.
> 
> Tobias