[ 
https://issues.apache.org/jira/browse/SVN-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14932730#comment-14932730
 ] 

Ivan Zhakov edited comment on SVN-4464 at 10/17/15 1:27 PM:
------------------------------------------------------------

I think this is caused by not properly making sure paths we use on the report 
editor are rooted in the target instead of the anchor.  If I change the path 
passed to link_path in diff_repos_wc to "" from target then these cases work 
properly but it breaks another diff test.

I suspect in general we just haven't thought about what happens when a repo to 
wc diff against a copy is pointing at some other path with 
--show-copies-as-adds.  Usually this would fail because the path isn't 
ancestrally related, but in this case the repo path is the copyfrom location 
for the copy.



was (Author: breser):
{noformat:nopanel=true}
I think this is caused by not properly making sure paths we use on the report
editor are rooted in the target instead of the anchor.  If I change the path
passed to link_path in diff_repos_wc to "" from target then these cases work
properly but it breaks another diff test.

I suspect in general we just haven't thought about what happens when a repo to
wc diff against a copy is pointing at some other path with
--show-copies-as-adds.  Usually this would fail because the path isn't
ancestrally related, but in this case the repo path is the copyfrom location for
the copy.
{noformat}


> diff repo to wc diff against a copy with --show-copies-as-adds is busted
> ------------------------------------------------------------------------
>
>                 Key: SVN-4464
>                 URL: https://issues.apache.org/jira/browse/SVN-4464
>             Project: Subversion
>          Issue Type: Bug
>          Components: libsvn_client
>    Affects Versions: 1.8.x
>            Reporter: Ben Reser
>            Assignee: Ben Reser
>             Fix For: ---
>
>
> This happens on 1.8.x and trunk (1.7 has other issues which is how I ended up 
> finding this)
> {noformat}
> svnadmin create repo
> svn co file://$PWD/repo wc
> cd wc
> echo foo > foo
> svn add foo
> svn ci -mm
> svn up
> svn cp foo bar
> svn diff ^/foo bar --show-copies-as-adds
> {noformat}
> Which produces:
> {noformat}
> Index: bar
> ===================================================================
> --- bar       (file:///Users/breser/double-diff/2/repo/foo)   (revision 1)
> +++ bar       (.../bar)       (working copy)
> @@ -1 +0,0 @@
> -foo
> Index: bar
> ===================================================================
> --- bar       (file:///Users/breser/double-diff/2/repo/foo)   (revision 0)
> +++ bar       (.../bar)       (working copy)
> @@ -0,0 +1 @@
> +foo
> {noformat}
> Yes really two diffs for the same file.  Same behavior happens with 
> directories.
> {noformat}
> svn mkdir a
> echo b > a/b
> svn add a/b
> svn ci -mm
> svn up
> svn cp a aa
> svn diff ^/a aa --show-copies-as-adds
> {noformat}
> {noformat}
> Index: aa/b
> ===================================================================
> --- aa/b      (file:///Users/breser/double-diff/2/repo/a)     (revision 2)
> +++ aa/b      (.../aa)        (working copy)
> @@ -1 +0,0 @@
> -b
> Index: aa/b
> ===================================================================
> --- aa/b      (file:///Users/breser/double-diff/2/repo/a)     (revision 0)
> +++ aa/b      (.../aa)        (working copy)
> @@ -0,0 +1 @@
> +b
> {noformat}
> Finally for some more fun you can actually segfault the client like so:
> {noformat}
> svn rm bar
> svn ci -mm
> svn cp foo bar
> svn diff ^/foo bar
> {noformat}
> This might be related but I'm not sure yet.
> Doing the a wc to wc diff e.g. {{svn diff foo bar --show-copies-as-adds}} 
> works as expected in all the above cases so if someone has ran into this 
> issue they can do that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to