Mercurial: Difference between revisions

53 bytes added ,  10 June 2020
(Overhaul Creating changesets (patches) section.)
Line 29: Line 29:
# 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>
# Make your changes (fix the bug) and save them.
# Make your changes (fix the bug) and save them.
# Commit your changes. Mercurial will ask you for a commit message, which should follow the [[commit message guidelines]] <pre>hg commit</pre>
# Commit your changes <pre>hg commit</pre> Mercurial will open your default editor and ask you for a commit message.  Please follow the [[commit message guidelines]], e.g. <syntaxhighlight lang="text">help.m: Display relevant topics first (bug #42424)
# Export the changes. This creates a file (in the case of the example below, it is called mypatch.patch) that contains a description of the changes that you've made. Someone else can then apply the patch and end up with a repository that looks the same as yours.
 
<pre> hg export -r tip -o mypatch.patch </pre>
* scripts/help/help.m: Describe how to display relevant topics first.</syntaxhighlight>
* Save the output to a file and upload it to the patch tracker. If your patch file is larger than the upload limit, you can compress it before uploading. Please use a free format!
# 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>
# 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!


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