Login | Register
My pages Projects Community openCollabNet

Discussions > dev > [Subclipse-dev] [svnclientadapter] Generating a diff for a renamed file as a full delete-create

subclipse
Discussion topic

Hide all messages in topic

All messages in topic

RE: Re: Re: [Subclipse-dev] [svnclientadapter] Generating a diff for a renamed file as a full delete-create

Author rombert
Full name Robert Munteanu
Date 2011-10-05 06:13:46 PDT
Message I'll do just that then, thanks.

Robert

> Consumers of a patch have no knowledge how it was created, so as long
> as you produce a valid file that reviewboard can consume I do not
> think there can be any issues.
>
>
> On Wed, Oct 5, 2011 at 8:06 AM, Robert Munteanu
> <robert dot munteanu at gmail dot com> wrote:
> > Mark,
> >
> > Thank you for your reply. I am considering working around this issue by manually generating the diff for 'added' files to always contain the standard header and each line in the file prefixed with '+'. Do you see any potential issues with this approach?
> >
> > Thanks,
> >
> > Robert
> >
> >> We are not involved in the actual diff process, we just call the API.
> >> The Subversion command line has the same issue.
> >>
> >> The SVN 1.7 command line adds some new options to help with this.  If
> >> they are exposed in the Java API then they can be exposed in
> >> svnClientAdapter.
> >>
> >>
> >>
> >> On Wed, Oct 5, 2011 at 7:02 AM, Robert Munteanu
> >> <robert dot munteanu at gmail dot com> wrote:
> >> > Hi,
> >> >
> >> > I am developing an Eclipse plugin (
> >> > https://github.com/r​ombert/ereviewboard ) which will offer Subclipse
> >> > integration . This integration mainly involves posting a diff to a
> >> > remote code review server.The single case which I am unable to handle
> >> > correctly is a renamed file. When renaming a Java class, named Second:
> >> >
> >> > package com.example;
> >> >
> >> > public class Second {
> >> >
> >> > }
> >> >
> >> > to Third:
> >> >
> >> > package com.example;
> >> >
> >> > public class Third {
> >> >
> >> > }
> >> >
> >> > I would expect the diff to show that Second.java has all lines deleted
> >> > and Third.java has all lines added. While Second.java does have all
> >> > lines deleted, Third.java only has a diff from Second.java:
> >> >
> >> > Index: src/com/example/Third.java
> >> > ====================​====================​====================​=======
> >> > --- src/com/example/Third.java  (revision 2)
> >> > +++ src/com/example/Third.java  (working copy)
> >> > @@ -1,5 +1,5 @@
> >> >  package com.example;
> >> >
> >> > -public class Second {
> >> > +public class Third {
> >> >
> >> >  }
> >> >
> >> > I am currently using  svnClient.createPatch(changes,
> >> > _project.getLocation​().toFile(), tmpFile, false) to generate the diff,
> >> > but have experimented with svnClient.diff as well, with no success.
> >> >
> >> > What are my options of generating a delete-create diff for a renamed file?
> >> >
> >> > Thanks,
> >> >
> >> > Robert
> >> >
> >> > --
> >> > Sent from my (old) computer
> >> >
> >> > --------------------​--------------------​--------------
> >> > http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1043​&dsMessageId=285​0181
> >> >
> >> > To unsubscribe from this discussion, e-mail: [dev-unsubscribe at subclipse dot tigris dot org].
> >> >
> >>
> >>
> >>
> >> --
> >> Thanks
> >>
> >> Mark Phippard
> >> http://markphip.blogspot.com/
> >
> > --------------------​--------------------​--------------
> > http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1043​&dsMessageId=285​0192
> >
> > To unsubscribe from this discussion, e-mail: [dev-unsubscribe at subclipse dot tigris dot org].
> >
>
>
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/

Re: Re: [Subclipse-dev] [svnclientadapter] Generating a diff for a renamed file as a full delete-create

Author markphip
Full name Mark Phippard
Date 2011-10-05 05:31:08 PDT
Message Consumers of a patch have no knowledge how it was created, so as long
as you produce a valid file that reviewboard can consume I do not
think there can be any issues.


On Wed, Oct 5, 2011 at 8:06 AM, Robert Munteanu
<robert.munteanu@​gmail.com> wrote:
> Mark,
>
> Thank you for your reply. I am considering working around this issue by manually generating the diff for 'added' files to always contain the standard header and each line in the file prefixed with '+'. Do you see any potential issues with this approach?
>
> Thanks,
>
> Robert
>
>> We are not involved in the actual diff process, we just call the API.
>> The Subversion command line has the same issue.
>>
>> The SVN 1.7 command line adds some new options to help with this.  If
>> they are exposed in the Java API then they can be exposed in
>> svnClientAdapter.
>>
>>
>>
>> On Wed, Oct 5, 2011 at 7:02 AM, Robert Munteanu
>> <robert dot munteanu at gmail dot com> wrote:
>> > Hi,
>> >
>> > I am developing an Eclipse plugin (
>> > https://github.com/r​ombert/ereviewboard ) which will offer Subclipse
>> > integration . This integration mainly involves posting a diff to a
>> > remote code review server.The single case which I am unable to handle
>> > correctly is a renamed file. When renaming a Java class, named Second:
>> >
>> > package com.example;
>> >
>> > public class Second {
>> >
>> > }
>> >
>> > to Third:
>> >
>> > package com.example;
>> >
>> > public class Third {
>> >
>> > }
>> >
>> > I would expect the diff to show that Second.java has all lines deleted
>> > and Third.java has all lines added. While Second.java does have all
>> > lines deleted, Third.java only has a diff from Second.java:
>> >
>> > Index: src/com/example/Third.java
>> > ====================​====================​====================​=======
>> > --- src/com/example/Third.java  (revision 2)
>> > +++ src/com/example/Third.java  (working copy)
>> > @@ -1,5 +1,5 @@
>> >  package com.example;
>> >
>> > -public class Second {
>> > +public class Third {
>> >
>> >  }
>> >
>> > I am currently using  svnClient.createPatch(changes,
>> > _project.getLocation​().toFile(), tmpFile, false) to generate the diff,
>> > but have experimented with svnClient.diff as well, with no success.
>> >
>> > What are my options of generating a delete-create diff for a renamed file?
>> >
>> > Thanks,
>> >
>> > Robert
>> >
>> > --
>> > Sent from my (old) computer
>> >
>> > --------------------​--------------------​--------------
>> > http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1043​&dsMessageId=285​0181
>> >
>> > To unsubscribe from this discussion, e-mail: [dev-unsubscribe at subclipse dot tigris dot org].
>> >
>>
>>
>>
>> --
>> Thanks
>>
>> Mark Phippard
>> http://markphip.blogspot.com/
>
> --------------------​--------------------​--------------
> http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1043​&dsMessageId=285​0192
>
> To unsubscribe from this discussion, e-mail: [dev-unsubscribe@sub​clipse.tigris.org].
>



--
Thanks

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

RE: Re: [Subclipse-dev] [svnclientadapter] Generating a diff for a renamed file as a full delete-create

Author rombert
Full name Robert Munteanu
Date 2011-10-05 05:06:18 PDT
Message Mark,

Thank you for your reply. I am considering working around this issue by manually generating the diff for 'added' files to always contain the standard header and each line in the file prefixed with '+'. Do you see any potential issues with this approach?

Thanks,

Robert

> We are not involved in the actual diff process, we just call the API.
> The Subversion command line has the same issue.
>
> The SVN 1.7 command line adds some new options to help with this. If
> they are exposed in the Java API then they can be exposed in
> svnClientAdapter.
>
>
>
> On Wed, Oct 5, 2011 at 7:02 AM, Robert Munteanu
> <robert dot munteanu at gmail dot com> wrote:
> > Hi,
> >
> > I am developing an Eclipse plugin (
> > https://github.com/r​ombert/ereviewboard ) which will offer Subclipse
> > integration . This integration mainly involves posting a diff to a
> > remote code review server.The single case which I am unable to handle
> > correctly is a renamed file. When renaming a Java class, named Second:
> >
> > package com.example;
> >
> > public class Second {
> >
> > }
> >
> > to Third:
> >
> > package com.example;
> >
> > public class Third {
> >
> > }
> >
> > I would expect the diff to show that Second.java has all lines deleted
> > and Third.java has all lines added. While Second.java does have all
> > lines deleted, Third.java only has a diff from Second.java:
> >
> > Index: src/com/example/Third.java
> > ====================​====================​====================​=======
> > --- src/com/example/Third.java  (revision 2)
> > +++ src/com/example/Third.java  (working copy)
> > @@ -1,5 +1,5 @@
> >  package com.example;
> >
> > -public class Second {
> > +public class Third {
> >
> >  }
> >
> > I am currently using  svnClient.createPatch(changes,
> > _project.getLocation​().toFile(), tmpFile, false) to generate the diff,
> > but have experimented with svnClient.diff as well, with no success.
> >
> > What are my options of generating a delete-create diff for a renamed file?
> >
> > Thanks,
> >
> > Robert
> >
> > --
> > Sent from my (old) computer
> >
> > --------------------​--------------------​--------------
> > http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1043​&dsMessageId=285​0181
> >
> > To unsubscribe from this discussion, e-mail: [dev-unsubscribe at subclipse dot tigris dot org].
> >
>
>
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/

Re: [Subclipse-dev] [svnclientadapter] Generating a diff for a renamed file as a full delete-create

Author markphip
Full name Mark Phippard
Date 2011-10-05 04:37:35 PDT
Message We are not involved in the actual diff process, we just call the API.
The Subversion command line has the same issue.

The SVN 1.7 command line adds some new options to help with this. If
they are exposed in the Java API then they can be exposed in
svnClientAdapter.



On Wed, Oct 5, 2011 at 7:02 AM, Robert Munteanu
<robert.munteanu@​gmail.com> wrote:
> Hi,
>
> I am developing an Eclipse plugin (
> https://github.com/r​ombert/ereviewboard ) which will offer Subclipse
> integration . This integration mainly involves posting a diff to a
> remote code review server.The single case which I am unable to handle
> correctly is a renamed file. When renaming a Java class, named Second:
>
> package com.example;
>
> public class Second {
>
> }
>
> to Third:
>
> package com.example;
>
> public class Third {
>
> }
>
> I would expect the diff to show that Second.java has all lines deleted
> and Third.java has all lines added. While Second.java does have all
> lines deleted, Third.java only has a diff from Second.java:
>
> Index: src/com/example/Third.java
> ====================​====================​====================​=======
> --- src/com/example/Third.java  (revision 2)
> +++ src/com/example/Third.java  (working copy)
> @@ -1,5 +1,5 @@
>  package com.example;
>
> -public class Second {
> +public class Third {
>
>  }
>
> I am currently using  svnClient.createPatch(changes,
> _project.getLocation​().toFile(), tmpFile, false) to generate the diff,
> but have experimented with svnClient.diff as well, with no success.
>
> What are my options of generating a delete-create diff for a renamed file?
>
> Thanks,
>
> Robert
>
> --
> Sent from my (old) computer
>
> --------------------​--------------------​--------------
> http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1043​&dsMessageId=285​0181
>
> To unsubscribe from this discussion, e-mail: [dev-unsubscribe@sub​clipse.tigris.org].
>



--
Thanks

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

[Subclipse-dev] [svnclientadapter] Generating a diff for a renamed file as a full delete-create

Author rombert
Full name Robert Munteanu
Date 2011-10-05 04:02:20 PDT
Message Hi,

I am developing an Eclipse plugin (
https://github.com/r​ombert/ereviewboard ) which will offer Subclipse
integration . This integration mainly involves posting a diff to a
remote code review server.The single case which I am unable to handle
correctly is a renamed file. When renaming a Java class, named Second:

package com.example;

public class Second {

}

to Third:

package com.example;

public class Third {

}

I would expect the diff to show that Second.java has all lines deleted
and Third.java has all lines added. While Second.java does have all
lines deleted, Third.java only has a diff from Second.java:

Index: src/com/example/Third.java
====================​====================​====================​=======
--- src/com/example/Third.java (revision 2)
+++ src/com/example/Third.java (working copy)
@@ -1,5 +1,5 @@
 package com.example;

-public class Second {
+public class Third {

 }

I am currently using svnClient.createPatch(changes,
_project.getLocation​().toFile(), tmpFile, false) to generate the diff,
but have experimented with svnClient.diff as well, with no success.

What are my options of generating a delete-create diff for a renamed file?

Thanks,

Robert

--
Sent from my (old) computer
Messages per page: