Using the Revision Control Mechanism extension (AEN 4.2.0)
==========================================================

.. raw:: html

    <p>The Revision Control Mechanism (RCM) Jupyter Notebook extension
    provides simple version control for notebook files. It uses the
    internal Jupyter functionality to perform tasks.</p>
    <p>On the surface, RCM uses a simple linear model, but beneath that
    is a more complex git-based branching model. This model uses the
    latest wins as its main merging strategy to prevent merge
    conflicts.</p>
    <p>The RCM Jupyter Notebook extension adds four buttons:</p>
    <div class="figure">
    <img alt="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm.png" src="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm.png" />
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    <ul class="simple">
    <li><a class="reference internal" href="#status-but"><span class="std std-ref">Status</span></a>.</li>
    <li><a class="reference internal" href="#checkout-but"><span class="std std-ref">Checkout</span></a>.</li>
    <li><a class="reference internal" href="#commit-but"><span class="std std-ref">Commit</span></a>.</li>
    <li><a class="reference internal" href="#config-git-but"><span class="std std-ref">Configure git</span></a>.</li>
    </ul>
    <p>TIP: If you do not see the RCM buttons, see <a class="reference internal" href="#first-time-rcm"><span class="std std-ref">Setting up RCM for the first time</span></a>.</p>
    <div class="section" id="using-the-status-button">
    <span id="status-but"></span><h2>Using the Status button<a class="headerlink" href="#using-the-status-button" title="Permalink to this headline">¶</a></h2>
    <p>The Status button allows you to see what revision you are on.</p>
    <p>Clicking the Status button displays:</p>
    <div class="figure">
    <img alt="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_status.png" src="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_status.png" />
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    </div>
    <div class="section" id="using-the-checkout-button">
    <span id="checkout-but"></span><h2>Using the Checkout button<a class="headerlink" href="#using-the-checkout-button" title="Permalink to this headline">¶</a></h2>
    <p>The Checkout button allows you to view a list of the previous revision points,
    check out a previous revision or compare differences between revisions.</p>
    <p>Clicking the Checkout button displays:</p>
    <div class="figure">
    <img alt="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_checkout.png" src="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_checkout.png" />
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    <div class="section" id="checking-out-a-previous-revision">
    <span id="checkout-previous"></span><h3>Checking out a previous revision<a class="headerlink" href="#checking-out-a-previous-revision" title="Permalink to this headline">¶</a></h3>
    <p>To checkout a notebook at an earlier revision point:</p>
    <ol class="arabic">
    <li><p class="first">Select the checkbox next to the desired revision point.</p>
    </li>
    <li><p class="first">Click the OK button.</p>
    <p>A copy of the notebook at the selected revision point is displayed.</p>
    </li>
    </ol>
    <p>NOTE: If you have not saved the work in your current project window, checking
    out a previous revision destroys it. If in doubt, click the Cancel button and
    save your work before reverting to a previous revision point.</p>
    </div>
    <div class="section" id="comparing-revisions">
    <h3>Comparing revisions<a class="headerlink" href="#comparing-revisions" title="Permalink to this headline">¶</a></h3>
    <p>To compare 2 previous revision points:</p>
    <ol class="arabic">
    <li><p class="first">Select the checkboxes of the revision points to compare.</p>
    </li>
    <li><p class="first">Click the View Diff button.</p>
    <p>A side-by-side comparison is displayed.</p>
    <p>Click the Cancel button to close the differences window.</p>
    </li>
    </ol>
    </div>
    </div>
    <div class="section" id="using-the-commit-button">
    <span id="commit-but"></span><h2>Using the Commit button<a class="headerlink" href="#using-the-commit-button" title="Permalink to this headline">¶</a></h2>
    <p>The Commit button allows you to save or persist the current changes, keeping a
    permanent record of any changes that are introduced, so that you do not have to
    worry about losing important data.</p>
    <p>Clicking the Commit button displays:</p>
    <div class="figure">
    <img alt="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_commit.png" src="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_commit.png" />
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    <ol class="arabic">
    <li><p class="first">Enter a description of the changes in the commit as a reminder in case you need to revert back to it later.</p>
    </li>
    <li><p class="first">Click the OK button.</p>
    <p>Your changes are committed and a revision point is created.</p>
    </li>
    </ol>
    <p>If Git user name and user email are not set, the following window appears:</p>
    <div class="figure">
    <img alt="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_commit_error.png" src="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_commit_error.png" />
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    <p>Configure Git and then try to commit again.</p>
    <p>TIP: You can roll back committed changes by <a class="reference internal" href="#checkout-previous"><span class="std std-ref">checking out a
    previous version</span></a>.</p>
    </div>
    <div class="section" id="using-the-configure-git-button">
    <span id="config-git-but"></span><h2>Using the Configure git button<a class="headerlink" href="#using-the-configure-git-button" title="Permalink to this headline">¶</a></h2>
    <p>The Configure git button allows you to configure Git user name and email values.</p>
    <p>After clicking the Configure Git button, the following window appears:</p>
    <div class="figure">
    <img alt="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_git_config.png" src="../../../../../../_images/ae-notebooks/4.2.0/aen-user-extensions_rcm_git_config.png" />
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    <p>Enter user name and e-mail address. Click the OK button when finished.</p>
    </div>
    <div class="section" id="setting-up-rcm-for-the-first-time">
    <span id="first-time-rcm"></span><h2>Setting up RCM for the first time<a class="headerlink" href="#setting-up-rcm-for-the-first-time" title="Permalink to this headline">¶</a></h2>
    <p>If you do not see the RCM buttons in your notebook:</p>
    <ol class="arabic">
    <li><p class="first">Go to the project home page.</p>
    </li>
    <li><p class="first">Open the Terminal application.</p>
    </li>
    <li><p class="first">In the terminal window, run:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>git config --global user.email <span class="s2">&quot;you@example.com&quot;</span>
    git config --global user.name <span class="s2">&quot;Your Name&quot;</span>
    </pre></div>
    </div>
    <p>NOTE: Change <code class="docutils literal"><span class="pre">you&#64;example.com</span></code> to your email address, and <code class="docutils literal"><span class="pre">Your</span> <span class="pre">Name</span></code> to your actual name.</p>
    </li>
    <li><p class="first">Open Jupyter Notebook and refresh the page.</p>
    </li>
    </ol>
    </div>
