Difference between revisions of "Submitting Patches"

From GeeklogWiki
Jump to: navigation, search
m (added a link to Tags and Branches)
m (to get a patch file, you need to redirect the output of hg export ...)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
If you want to submit a patch for Geeklog, please check out the current development version from our [[Using Mercurial|Mercurial]] repository. You can also submit patches against released versions by checking out that version's code using the <tt>..._stable</tt> [[Tags and Branches|tag]].
 
If you want to submit a patch for Geeklog, please check out the current development version from our [[Using Mercurial|Mercurial]] repository. You can also submit patches against released versions by checking out that version's code using the <tt>..._stable</tt> [[Tags and Branches|tag]].
  
 +
==Checklist==
 
* check out the source code
 
* check out the source code
 
* make the necessary changes to the source
 
* make the necessary changes to the source
 
* commit changes into your local repository
 
* commit changes into your local repository
* export the changeset using <tt>hg export REV</tt> where <tt>REV</tt> is the revision number of the changeset
+
* Exporting:
** to export the latest changeset from your repository, simply use <pre>hg export tip</pre>
+
** export the changeset using <tt>hg export REV</tt> where <tt>REV</tt> is the revision number of the changeset
** if your patch consists of more than one changeset, please export them individually into separate files with consecutive numbers so we know in which order they need to be applied
+
*** to export the latest changeset from your repository, simply use <pre>hg export tip > patch.diff</pre>
 +
*** The TortoiseHg GUI equivalence is: '''Hg Repository Explorer=>choose Changeset=>Export Patch'''
 +
* if your patch consists of more than one changeset, please export them individually into separate files with consecutive numbers so we know in which order they need to be applied (Note: while <tt>hg export</tt> can export multiple changesets into one file, the equivalent <tt>hg import</tt> currently only accepts one changeset per file, so we're asking for separate files.)
 +
* Diff files:
 +
** if you are '''not''' using <tt>hg export</tt> please send ''unified'' diff files and make sure you list the files in the correct order, i.e. <pre>diff -u original-file modified-file > patch.diff</pre>
 +
** The TortoiseHg GUI equivalence is: '''Hg Commit=>Diff''' ''(?)''
 
* add the patch (or zipped/gzipped set of patches) as an attachment to the bug or feature request in question on our [http://project.geeklog.net/tracking/ bugtracker]
 
* add the patch (or zipped/gzipped set of patches) as an attachment to the bug or feature request in question on our [http://project.geeklog.net/tracking/ bugtracker]
 
** if there is no bug or feature request for your patch, send the patch (with an explanation) to the [http://eight.pairlist.net/mailman/admindb/geeklog-devel geeklog-devel] mailing list (if the patch is really huge, you may want to upload it somewhere and only send the URL)
 
** if there is no bug or feature request for your patch, send the patch (with an explanation) to the [http://eight.pairlist.net/mailman/admindb/geeklog-devel geeklog-devel] mailing list (if the patch is really huge, you may want to upload it somewhere and only send the URL)
Line 12: Line 18:
 
Thank you!
 
Thank you!
  
 +
== diff vs. hg export ==
 +
 +
You may be wondering why we're asking you to use <tt>hg export</tt> instead of the more common <tt>diff</tt> files. That is because export files
 +
* include the checkin comment
 +
* give proper attribution to the person who created the patch (i.e. '''you''')
  
 
[[Category:Development]]
 
[[Category:Development]]

Latest revision as of 18:03, 3 May 2010

If you want to submit a patch for Geeklog, please check out the current development version from our Mercurial repository. You can also submit patches against released versions by checking out that version's code using the ..._stable tag.

Checklist

  • check out the source code
  • make the necessary changes to the source
  • commit changes into your local repository
  • Exporting:
    • export the changeset using hg export REV where REV is the revision number of the changeset
      • to export the latest changeset from your repository, simply use
        hg export tip > patch.diff
      • The TortoiseHg GUI equivalence is: Hg Repository Explorer=>choose Changeset=>Export Patch
  • if your patch consists of more than one changeset, please export them individually into separate files with consecutive numbers so we know in which order they need to be applied (Note: while hg export can export multiple changesets into one file, the equivalent hg import currently only accepts one changeset per file, so we're asking for separate files.)
  • Diff files:
    • if you are not using hg export please send unified diff files and make sure you list the files in the correct order, i.e.
      diff -u original-file modified-file > patch.diff
    • The TortoiseHg GUI equivalence is: Hg Commit=>Diff (?)
  • add the patch (or zipped/gzipped set of patches) as an attachment to the bug or feature request in question on our bugtracker
    • if there is no bug or feature request for your patch, send the patch (with an explanation) to the geeklog-devel mailing list (if the patch is really huge, you may want to upload it somewhere and only send the URL)

Thank you!

diff vs. hg export

You may be wondering why we're asking you to use hg export instead of the more common diff files. That is because export files

  • include the checkin comment
  • give proper attribution to the person who created the patch (i.e. you)