Mercurial: Difference between revisions

Jump to navigation Jump to search
450 bytes removed ,  10 June 2020
→‎Submitting patches: Condense section to relevant information.
(→‎Submitting patches: Condense section to relevant information.)
Line 13: Line 13:
* Follow the style guides for both [[Octave style guide|Octave]] and [[C++ style guide|C++]] languages.
* Follow the style guides for both [[Octave style guide|Octave]] and [[C++ style guide|C++]] languages.


== Submitting patches ==
== Creating and submitting patches (changesets) ==


When you do not have push permissions to the repository (you cannot add your changes using mercurial itself) and you have a modification to the current GNU Octave code, you have to generate a patch (or changeset) so developers with permissions can include them in the code. The overview of the process is as follows
If you want to modify Octave's source code, given at https://www.octave.org/hg/octave, you cannot just submit your changes there. You have to generate a patch (or changeset) so Octave developers with permissions can include them into Octave's source code.
# Change the code and test that your changes do work (write tests, that's the best!).
# Create the changeset (instructions below).
# Post your patch in the [https://savannah.gnu.org/patch/?group=octave Patch tracker].
 
Patch submissions is done via the [https://savannah.gnu.org/bugs/?group=octave bug]
or [https://savannah.gnu.org/patch/?group=octave patch] trackers.  Either
way, you can submit via two different methods: pull requests or attaching
a changeset file.
 
=== Creating changesets (patches) ===


# Get the latest revision of Octave (or some Octave package) <pre>hg clone https://www.octave.org/hg/octave</pre> or when already cloned <pre>hg pull && hg update</pre>
# Get the latest revision of Octave (or some Octave package) <pre>hg clone https://www.octave.org/hg/octave</pre> or when already cloned <pre>hg pull && hg update</pre>
Line 34: Line 24:
# Export the changes <pre>hg export -r tip -o bug42424.patch</pre> The final patch for submission will look like this<syntaxhighlight lang="patch">
# Export the changes <pre>hg export -r tip -o bug42424.patch</pre> The final patch for submission will look like this<syntaxhighlight lang="patch">
</syntaxhighlight>
</syntaxhighlight>
# Upload {{Path|bug42424.patch}} to the bug or patch tracker. If your patch file is larger than the upload limit, you can compress it before uploading. Please use a free format!
# Upload {{Path|bug42424.patch}} to the [https://savannah.gnu.org/bugs/?group=octave bug] or [https://savannah.gnu.org/patch/?group=octave patch] tracker. If your patch file is larger than the upload limit, you can compress it before uploading. Please use a free format!


== Mercurial Tips for SoC students ==
== Mercurial Tips for SoC students ==

Navigation menu