Mercurial: Difference between revisions

Jump to navigation Jump to search
63 bytes removed ,  11 June 2020
(→‎Footnotes: Add section.)
Line 40: Line 40:
== Mercurial Tips for SoC students ==
== Mercurial Tips for SoC students ==


This section is meant to provide tips for SOCIS or GSoC students working on new Octave features.
This section is meant to provide tips for [[Summer of Code]] students working on new Octave features.


Students should publish their work as it progresses in a public repository  
Students should publish their work as it progresses in a public repository. In this section we use for example <code>public.server.org/octave</code>.
merging regularly the main savannah repository to facilitate merging back their
code at the end of the project.  


Here are some useful hg commands that can be used to do this.
=== Using bookmarks ===


=== Getting started ===
[https://www.mercurial-scm.org/wiki/Bookmarks Bookmarks] are useful for identifying a series of commits.  They are a "lightweight" solution to [https://www.mercurial-scm.org/wiki/NamedBranches named branches], which are not automatically updated for example.  To create a bookmark <code>my-gsoc</code> use
<!--[[File:Hg-student-start.png]]-->
 
<ol>
<syntaxhighlight lang="bash">
<li> Clone the main Octave repository at savannah:<br>
hg clone https://www.octave.org/hg/octave </code>
<code> hg clone https://www.octave.org/hg/octave </code> </li>
hg bookmark my-gsoc
<li> Create a new bookmark:<br>
</syntaxhighlight>
<code> hg bookmark student-bookmark-name </code> </li>
 
<li> Make the bookmark visible in the public repo, assuming the public repo is at <code>public.server.org/octave</code><br>
To make the bookmark visible in the public repository use
<code> hg push --bookmark ssh://student@public.server.org/octave </code> </li>
 
</ol>
<syntaxhighlight lang="bash">
hg push --bookmark ssh://student@public.server.org/octave
</syntaxhighlight>


=== Staying up-to-date with the main savannah repository ===
=== Staying up-to-date with the main repository ===


<!-- After working for a while, the public repo should look like the following picture. -->
As the students development proceeds,
As the students development proceeds,
the savannah repository gets updated, too.  
the savannah repository gets updated, too.  
Line 83: Line 82:


=== Preparing for code reviews ===
=== Preparing for code reviews ===
At the time of the mid-term or final review (or whenever the mentor requires it) students should prepare their code  
At the time of the mid-term or final review (or whenever the mentor requires it) students should prepare their code  
for review and possibly inclusion into the main development branch. To this end students should:
for review and possibly inclusion into the main development branch. To this end students should:

Navigation menu