• Post Reply Bookmark Topic Watch Topic
  • New Topic

Patch in Java  RSS feed

 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've written some code in our current project. I am being asked (before signing it in) to create a patch that will extend itself and the destination project will be just like mine now.
How do I do this?

Thanks.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are they expecting a patch in standard UNIX patch format? If you're working on a UNIX system, you can use the "diff" utility to create one.

Otherwise, you might ask exactly what they're expecting. A Java program? A Windows executable? Something else?
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patch file is differences between a locally modified copy of a file and the
repository version.

Most of the Java IDE's provide creating patch. You can look into subversion
control system you might be using that support generating and applying patch.
 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
Are they expecting a patch in standard UNIX patch format? If you're working on a UNIX system, you can use the "diff" utility to create one.

Otherwise, you might ask exactly what they're expecting. A Java program? A Windows executable? Something else?


Windows. Anything is good
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly do you mean by "destination project"?
 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The recipient has the same project like I did before my code additions. So after he applies the patch his project has to be like he copied my whole current one. By the way I use intellij if that's relevant.
 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chandra Bhatt:
Patch file is differences between a locally modified copy of a file and the
repository version.

Most of the Java IDE's provide creating patch. You can look into subversion
control system you might be using that support generating and applying patch.


correct answer!
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Landon:
The recipient has the same project like I did before my code additions. So after he applies the patch his project has to be like he copied my whole current one. By the way I use intellij if that's relevant.


So he also has the source code, but you are not sharing the version control repository? Sounds strange, but in that case, yes, a patch generated by the vcs should be a good option.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you ask the people who gave you the assignment to clarify exactly what they mean with a patch, and what they expect from you?

We can all try to guess what is meant here, but since there is no single, clear definition of what a patch is, we can't give you any exact answer.
 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patch:
*.patch file

Thanks for helping guys
[ October 23, 2008: Message edited by: John Landon ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!