Mercurial: Difference between revisions

384 bytes removed ,  10 June 2020
Overhaul Creating changesets (patches) section.
(Put tutorials to External links.)
(Overhaul Creating changesets (patches) section.)
Line 12: Line 12:
* Always include commit messages in changesets.  Please follow the Octave [[commit message guidelines]]
* Always include commit messages in changesets.  Please follow the Octave [[commit message guidelines]]
* 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.
== Getting the development sources ==
To clone the Octave repository:
hg clone http://www.octave.org/hg/octave octave
Octave packages like image, signal, control, etc. are not parts of Octave
itself, they belong to the Octave Forge.  Each package has its own
repository, a list of which can be found
[http://sourceforge.net/p/octave/_list/hg?source=navbar here].
You can clone them in a similar way, for example, to clone the signal package
hg clone http://hg.code.sf.net/p/octave/signal octave-signal


== Submitting patches ==
== Submitting patches ==
Line 43: Line 27:
=== Creating changesets (patches) ===
=== Creating changesets (patches) ===


* Update to the latest revision.  
# 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>
<pre> hg up </pre>
# Make your changes (fix the bug) and save them.
* Make your changes 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 code. Mercurial will ask you for a commit message, which should follow the [[commit message guidelines]].
# 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 ci </pre>
* Export the modifications. 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>
<pre> hg export -r tip -o mypatch.patch </pre>
* 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!
* 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!