You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Anil Ramnanan <li...@peppersauce.org> on 2005/06/30 21:34:32 UTC

Submitting Patches

How do I go about submitting patches when they include new files and 
packages ?

Anil.


Re: Submitting Patches

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> Anil Ramnanan wrote:
> >Ross Gardler wrote:
> >>
> >>Install the subclipse plugin 
> >>http://www.eclipse-plugins.info/eclipse/plugin_details.jsp?id=338
> >>
> >>I'm not exactly sure how well this works, or how you use it as I use 
> >>the command line options, it is harder to learn, but more controllable 
> >>in the long run.
> >>
> >Subclipse has a menu option to create a patch. Can I use that to create 
> >the patches ?
> 
> I don't use subclipse so I can tell you I'm afraid. If you want to try 
> it then use it for your next patch and I'll tell you if it is OK.

Whether you use the svn command-line client or a fancy client,
then you still need to make sure you know how to operate SVN properly.
http://svnbook.red-bean.com/ is a must.

e.g. Make sure to do three things before creating the patch:

* Do 'svn update' to be in sync with the repository in case
someone else changed your files in SVN.

* Do 'svn status' to ensure that you are not including
unnecessary changes.

* Do 'svn diff' to ensure that changes are what you expect.

After creating the patch, open it with a text editor and review it.

-David

Re: Submitting Patches

Posted by Ross Gardler <rg...@apache.org>.
Anil Ramnanan wrote:
> Ross Gardler wrote:
> 
>>
>> Install the subclipse plugin 
>> http://www.eclipse-plugins.info/eclipse/plugin_details.jsp?id=338
>>
>> I'm not exactly sure how well this works, or how you use it as I use 
>> the command line options, it is harder to learn, but more controllable 
>> in the long run.
>>
> Subclipse has a menu option to create a patch. Can I use that to create 
> the patches ?

I don't use subclipse so I can tell you I'm afraid. If you want to try 
it then use it for your next patch and I'll tell you if it is OK.

Ross

Re: Submitting Patches

Posted by Anil Ramnanan <li...@peppersauce.org>.
Ross Gardler wrote:

>
> Install the subclipse plugin 
> http://www.eclipse-plugins.info/eclipse/plugin_details.jsp?id=338
>
> I'm not exactly sure how well this works, or how you use it as I use 
> the command line options, it is harder to learn, but more controllable 
> in the long run.
>
Subclipse has a menu option to create a patch. Can I use that to create 
the patches ?

Anil.


Re: Submitting Patches

Posted by David Crossley <cr...@apache.org>.
Another thing with patches:

When you have a suite of changes that are tested and ready
to be applied, then contribute that. In other words,
don't wait too long between patches. Otherwise it starts
to get complicated.

-David

Re: Submitting Patches

Posted by Ross Gardler <rg...@apache.org>.
Anil Ramnanan wrote:
> How do I go about submitting patches when they include new files and 
> packages ?

The process of submitting is the same, but the process of generating the 
patch is slightly different (you probably know most of this, but I get 
round to the point eventually - honest ;-)

 From within Eclipse
===================

Install the subclipse plugin 
http://www.eclipse-plugins.info/eclipse/plugin_details.jsp?id=338

I'm not exactly sure how well this works, or how you use it as I use the 
command line options, it is harder to learn, but more controllable in 
the long run.

I think you add new files by right clicking on the file and selecting 
"Team | share" or "Team | add" or something like that. If there is no 
meaningful entry there then have a look in the synchronisation view.

I recommend learning the command line method, so...

 From the command line
=====================

NOTE: much more info is available at http://svnbook.red-bean.com/

First off, ensure you have the command line version of Subversion 
installed (http://subversion.tigris.org/)

---

'svn up'

to make sure you have an up to date local copy. Check for any conflicts 
and resolve them where necessary

---

Test your work to ensure that the update didn't break anything

---

'svn diff'

Will show you the differences between your local copy and the remote 
copy. Check that there are no surprises in there, such as accidentally 
added files.

---

Now, if you are *absolutely* sure that there are no changes that should 
not be committed yet. You can use the command 'build patch' (located in 
FORREST_HOME/main to create your patch file.

=======
WARNING
-------
You must be extremely careful using this command. If there are any 
changes within Forrest that are not relevant to your commit they will 
also be included. This makes it very difficult for devs to apply your 
matches.

If you have changes that you do not want to commit at this time then you 
need to build the patch manually. To do this you do:

'svn diff src/documentation/content/xdocs/faq.xml > faq.xml.diff'

the file you are building the patch for need not be a single file, it 
can be a directory, a list of files or a combination of both.

If you are adding new files along with patches to existing files then 
you will need to package these files, along with the diff file, in a zip 
file. Be sure to include the files with the correct path so that they 
are unpacked into the right location.

Ross