You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by prabhugnanasundar <pr...@collab.net> on 2010/11/24 15:38:18 UTC

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

Hi all,

 I am in the process of implementing the '--diff-copy-from' in svn diff,
just similar to the '--diff-copy-from' in the svnlook diff. I have done
the coding part for all the 'ra' layers, except the 'svnserve'. 

Meanwhile I came to know that the 'send_copyfrom_args' for 'svn
update' (client side) has been rolled back by Mike, with reference to
the issue #3711. But now, in my case, I genuinely need the
'send_copyfrom_args' for getting the 'copyfrom_revision' and the
'copyfrom_path' of the file getting diffed. 

I use the existing ra_(neon|serf|local) API to send_copy_from_args to
backend.

After learning the rollback in #3711 I am worried whether similar
reverts are possible in ra_layer also.

I am attaching the patch and log so far just to show the progress.


Thanks and regards
Prabhu

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

Posted by Mark Phippard <ma...@gmail.com>.
On Wed, Nov 24, 2010 at 6:24 PM, Stefan Sperling <st...@elego.de> 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.


Given that he was asking about the RA layer in his original question,
I assume it must be some scenario when comparing with URL's,


-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

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

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

Posted by Prabhu Gnana Sundar <pr...@collab.net>.
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 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 Kamesh Jayachandran <ka...@collab.net>.
>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.

With regards
Kamesh Jayachandran

>There is a new option in 1.7 called --show-copies-as-adds which
>changes this behaviour such that copied files are always shown as
>fully added.

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 Wed, Nov 24, 2010 at 09:08:18PM +0530, prabhugnanasundar wrote:
> Hi all,
> 
>  I am in the process of implementing the '--diff-copy-from' in svn diff,
> just similar to the '--diff-copy-from' in the svnlook diff. I have done
> the coding part for all the 'ra' layers, except the 'svnserve'. 

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?

There is a new option in 1.7 called --show-copies-as-adds which
changes this behaviour such that copied files are always shown as
fully added.

Stefan

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 11/24/2010 10:38 AM, prabhugnanasundar wrote:
> Hi all,
> 
>  I am in the process of implementing the '--diff-copy-from' in svn diff,
> just similar to the '--diff-copy-from' in the svnlook diff. I have done
> the coding part for all the 'ra' layers, except the 'svnserve'. 
> 
> Meanwhile I came to know that the 'send_copyfrom_args' for 'svn
> update' (client side) has been rolled back by Mike, with reference to
> the issue #3711. But now, in my case, I genuinely need the
> 'send_copyfrom_args' for getting the 'copyfrom_revision' and the
> 'copyfrom_path' of the file getting diffed. 
> 
> I use the existing ra_(neon|serf|local) API to send_copy_from_args to
> backend.
> 
> After learning the rollback in #3711 I am worried whether similar
> reverts are possible in ra_layer also.
> 
> I am attaching the patch and log so far just to show the progress.

I have no intention of reverting the RA portions.  First, those already
exist as part of the published/released RA API, so we have to keep them in
there.  But more importantly, just because the client's *use* of that
information wasn't ideal and has been removed doesn't mean that the
information itself isn't useful for other applications.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand