You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Prabhu Gnana Sundar <pr...@collab.net> on 2010/11/25 07:40:59 UTC

Re: Will send_copyfrom_args be reverted for 'ra' layers too just like in issue #3711

Hi,
 Stefan, we are quite aware of the case you mentioned in your previous
mail. There the diff is between two explicit paths. I guess the below
screenshot would make the intention behind the work much clearer.
Here is my screenshot...
 
$ vi file1
$ svn add file1 
A         file1
$ svn ci -m "added file1"
Adding         file1
Transmitting file data .
Committed revision 1.

$ svn up
At revision 1.

$ svn rm file1 
D         file1
$ svn ci -m "removed file1"
Deleting       file1

Committed revision 2.

$ svn cp file:///tmp/testrepo/file1@1 file2
A         file2
$ svn ci -m "coped file1"prabhugnanasundar@prabhugnanasundar:/tmp/testwc
$ vi file2
$ svn ci -m "copied and modified file2"
Adding         file2
Transmitting file data .
Committed revision 3.

$ svn up
At revision 3.

$ svn diff -c3
Index: file2
===================================================================
--- file2       (revision 0)
+++ file2       (revision 3)
@@ -0,0 +1,8 @@
+1
+2
+3
+4
+5
+6
+7
+8

$ svn diff -c3 --diff-copy-from
Index: file2
===================================================================
--- file2       (revision 2)
+++ file2       (revision 3)
@@ -3,3 +3,6 @@
 3
 4
 5
+6
+7
+8

This property is quite similar to the svnlook's --diff-copy-from. Hope
this explains you the whole idea of implementation. :)


Thanks and regards,
Prabhu

On Thu, 2010-11-25 at 00:24 +0100, Stefan Sperling wrote:
> On Thu, Nov 25, 2010 at 12:08:41AM +0530, Kamesh Jayachandran wrote:
> > 
> > >AFAIK svn diff always prints a diff against the copy source if the
> > >items being diffed are source and target of a copy. How is what you
> > >intend to do different from the default behaviour?
> > 
> > What Prabhu's '--diff-copy-from' do is 'get the modification to file *alone* done in a same commit as copy'.
> > 
> > Without this switch it would show all the lines as 'added' with this switch it would show only 'the modified lines'.
> > 
> > While debugging some issue I could see 'svnlook diff --diff-copy-from' doing exactly the same and asked Prabhu to do the same.
> > 
> 
> Hi Kamesh,
> 
> I don't understand what you mean.
> We're probably not talking about the same thing.
> 
> I'm talking about this (the file is copied and the copy is modified
> before commit):
> 
> $ svn cp alpha alpha2
> A         alpha2
> $ vi alpha2
> $ svn di alpha2
> Index: alpha2
> ===================================================================
> --- alpha2      (working copy)
> +++ alpha2      (working copy)
> @@ -2,7 +2,6 @@ alpha
>  1
>  2
>  3
> -4
>  5
>  6
>  7
> $ svn ci -m"copied alpha to alpha2"
> Adding         alpha2
> Transmitting file data .
> Committed revision 4.
> $ svn di ^/trunk/alpha ^/trunk/alpha2
> Index: alpha
> ===================================================================
> --- alpha       (.../alpha)     (revision 4)
> +++ alpha       (.../alpha2)    (revision 4)
> @@ -2,7 +2,6 @@ alpha
>  1
>  2
>  3
> -4
>  5
>  6
>  7
> 
> As you can see, the copied file is never shown as fully added.
> In which situation do you see the file as fully added?
> 
> Thanks,
> Stefan

Re: Will send_copyfrom_args be reverted for 'ra' layers too just like in issue #3711

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Nov 25, 2010 at 01:10:59PM +0530, Prabhu Gnana Sundar wrote:
> Hi,
>  Stefan, we are quite aware of the case you mentioned in your previous
> mail. There the diff is between two explicit paths. I guess the below
> screenshot would make the intention behind the work much clearer.
> Here is my screenshot...
>  
> $ vi file1
> $ svn add file1 
> A         file1
> $ svn ci -m "added file1"
> Adding         file1
> Transmitting file data .
> Committed revision 1.
> 
> $ svn up
> At revision 1.
> 
> $ svn rm file1 
> D         file1
> $ svn ci -m "removed file1"
> Deleting       file1
> 
> Committed revision 2.
> 
> $ svn cp file:///tmp/testrepo/file1@1 file2
> A         file2
> $ svn ci -m "coped file1"prabhugnanasundar@prabhugnanasundar:/tmp/testwc
> $ vi file2
> $ svn ci -m "copied and modified file2"
> Adding         file2
> Transmitting file data .
> Committed revision 3.
> 
> $ svn up
> At revision 3.
> 
> $ svn diff -c3
> Index: file2
> ===================================================================
> --- file2       (revision 0)
> +++ file2       (revision 3)
> @@ -0,0 +1,8 @@
> +1
> +2
> +3
> +4
> +5
> +6
> +7
> +8
> 
> $ svn diff -c3 --diff-copy-from
> Index: file2
> ===================================================================
> --- file2       (revision 2)
> +++ file2       (revision 3)
> @@ -3,3 +3,6 @@
>  3
>  4
>  5
> +6
> +7
> +8
> 
> This property is quite similar to the svnlook's --diff-copy-from. Hope
> this explains you the whole idea of implementation. :)

OK, that is neat :)
I'm looking forward to seeing the patch.

BTW, you might run into this issue during testing:
http://subversion.tigris.org/issues/show_bug.cgi?id=2873
If you see this, don't try to fix it in the same go.
I've done some investigation and it's quite hard to fix.
I'll add my findings to that issue.

Thanks,
Stefan