-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5910b99
Showing
54 changed files
with
19,456 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: de63d13cbb8478718aa38e9b8e2a2c72 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<!DOCTYPE html> | ||
<html class="writer-html5" lang="en" > | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Overview: module code — multigit 0.11.4-1 documentation</title> | ||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> | ||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> | ||
<!--[if lt IE 9]> | ||
<script src="../_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> | ||
<script src="../_static/jquery.js"></script> | ||
<script src="../_static/underscore.js"></script> | ||
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> | ||
<script src="../_static/doctools.js"></script> | ||
<script src="../_static/sphinx_highlight.js"></script> | ||
<script src="../_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="../genindex.html" /> | ||
<link rel="search" title="Search" href="../search.html" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
<div class="wy-grid-for-nav"> | ||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
<a href="../index.html" class="icon icon-home"> multigit | ||
</a> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> | ||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../subrepos.html">Class Subrepos</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../gitrepo.html">Class Gitrepo</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > | ||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../index.html">multigit</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../index.html" class="icon icon-home"></a></li> | ||
<li class="breadcrumb-item active">Overview: module code</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>All modules for which code is available</h1> | ||
<ul><li><a href="multigit.html">multigit</a></li> | ||
<ul><li><a href="multigit/gitrepo.html">multigit.gitrepo</a></li> | ||
<li><a href="multigit/subrepos.html">multigit.subrepos</a></li> | ||
</ul></ul> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2021, Jesús M. Navarro.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | ||
provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
|
||
</footer> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<script> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
<!DOCTYPE html> | ||
<html class="writer-html5" lang="en" > | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>multigit — multigit 0.11.4-1 documentation</title> | ||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> | ||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> | ||
<!--[if lt IE 9]> | ||
<script src="../_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> | ||
<script src="../_static/jquery.js"></script> | ||
<script src="../_static/underscore.js"></script> | ||
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script> | ||
<script src="../_static/doctools.js"></script> | ||
<script src="../_static/sphinx_highlight.js"></script> | ||
<script src="../_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="../genindex.html" /> | ||
<link rel="search" title="Search" href="../search.html" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
<div class="wy-grid-for-nav"> | ||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
<a href="../index.html" class="icon icon-home"> multigit | ||
</a> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> | ||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../subrepos.html">Class Subrepos</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../gitrepo.html">Class Gitrepo</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > | ||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../index.html">multigit</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../index.html" class="icon icon-home"></a></li> | ||
<li class="breadcrumb-item"><a href="index.html">Module code</a></li> | ||
<li class="breadcrumb-item active">multigit</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>Source code for multigit</h1><div class="highlight"><pre> | ||
<span></span><span class="c1"># -*- coding: utf-8 -*-</span> | ||
<span class="sd">"""</span> | ||
<span class="sd">This script is a Python implementation of `simplest-git-subrepos <https://github.com/jmnavarrol/simplest-git-subrepos>`_.</span> | ||
|
||
<span class="sd">:package: multigit |release|</span> | ||
<span class="sd">:author: `Jesús M. Navarro <mailto:[email protected]>`_</span> | ||
<span class="sd">:license: `GNU General Public License v3.0 <https://github.com/jmnavarrol/python-multigit/blob/main/LICENSE>`_</span> | ||
<span class="sd">:source: https://github.com/jmnavarrol/python-multigit</span> | ||
<span class="sd">"""</span> | ||
|
||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'0.11.4-1'</span> | ||
|
||
<span class="c1"># Import stuff</span> | ||
<span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">sys</span> | ||
<span class="kn">import</span> <span class="nn">argparse</span> | ||
|
||
<span class="c1"># "local" imports</span> | ||
<span class="kn">from</span> <span class="nn">.subrepos</span> <span class="kn">import</span> <span class="n">Subrepos</span><span class="p">,</span> <span class="n">SUBREPOS_FILE</span> | ||
<span class="c1"># Other imports so there's visibility of all classes in the module</span> | ||
<span class="kn">from</span> <span class="nn">.gitrepo</span> <span class="kn">import</span> <span class="n">Gitrepo</span> | ||
<span class="kn">from</span> <span class="nn">.subrepofile</span> <span class="kn">import</span> <span class="n">Subrepofile</span> | ||
|
||
|
||
|
||
<span class="c1"># MAIN entry point</span> | ||
<div class="viewcode-block" id="main"><a class="viewcode-back" href="../index.html#multigit.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">():</span> | ||
<span class="sd">'''Processes command line parameters'''</span> | ||
<span class="n">parser</span> <span class="o">=</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">(</span> | ||
<span class="n">description</span><span class="o">=</span><span class="s2">"Manages git repos within git repos."</span><span class="p">,</span> | ||
<span class="n">add_help</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="c1"># this way I can force help to be an exclusion option along the others</span> | ||
<span class="p">)</span> | ||
|
||
<span class="c1"># Main options</span> | ||
<span class="n">main_parser</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">add_mutually_exclusive_group</span><span class="p">()</span> | ||
<span class="n">main_parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">'-h'</span><span class="p">,</span> <span class="s1">'--help'</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s1">'store_true'</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s2">"Shows this help."</span><span class="p">)</span> | ||
<span class="n">main_parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">'-V'</span><span class="p">,</span> <span class="s1">'--version'</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s1">'store_true'</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s2">"Shows "</span> <span class="o">+</span> <span class="n">parser</span><span class="o">.</span><span class="n">prog</span> <span class="o">+</span> <span class="s2">" version and quits."</span><span class="p">)</span> | ||
<span class="n">main_parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">'-r'</span><span class="p">,</span> <span class="s1">'--run'</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s1">'store_true'</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s2">"Recursively processes '"</span> <span class="o">+</span> <span class="n">SUBREPOS_FILE</span> <span class="o">+</span> <span class="s2">"' files found."</span><span class="p">)</span> | ||
<span class="n">main_parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">'-s'</span><span class="p">,</span> <span class="s1">'--status'</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s1">'store_true'</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s2">"Shows repositories' current status."</span><span class="p">)</span> | ||
|
||
<span class="c1"># Ready to parse args</span> | ||
<span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span> | ||
<span class="c1">#print(args)</span> | ||
|
||
<span class="c1"># Run on the options</span> | ||
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span> | ||
<span class="k">if</span> <span class="n">args</span><span class="o">.</span><span class="n">help</span><span class="p">:</span> | ||
<span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="si">%s</span><span class="s2"> (</span><span class="si">%s</span><span class="s2">)</span><span class="se">\n</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">prog</span><span class="p">,</span> <span class="n">__version__</span><span class="p">))</span> | ||
<span class="n">parser</span><span class="o">.</span><span class="n">print_help</span><span class="p">()</span> | ||
<span class="k">elif</span> <span class="n">args</span><span class="o">.</span><span class="n">version</span><span class="p">:</span> | ||
<span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">prog</span><span class="p">,</span> <span class="n">__version__</span><span class="p">))</span> | ||
<span class="k">else</span><span class="p">:</span> | ||
<span class="n">my_subrepos</span> <span class="o">=</span> <span class="n">Subrepos</span><span class="p">()</span> | ||
<span class="n">my_subrepos</span><span class="o">.</span><span class="n">process</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">(),</span> <span class="n">report_only</span><span class="o">=</span><span class="n">args</span><span class="o">.</span><span class="n">status</span><span class="p">)</span> | ||
<span class="k">else</span><span class="p">:</span> | ||
<span class="c1"># Program called with no arguments (shows help)</span> | ||
<span class="nb">print</span><span class="p">(</span><span class="s2">"</span><span class="si">%s</span><span class="s2"> (</span><span class="si">%s</span><span class="s2">): arguments required.</span><span class="se">\n</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">parser</span><span class="o">.</span><span class="n">prog</span><span class="p">,</span> <span class="n">__version__</span><span class="p">))</span> | ||
<span class="n">parser</span><span class="o">.</span><span class="n">print_help</span><span class="p">()</span></div> | ||
|
||
|
||
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">'__main__'</span><span class="p">:</span> | ||
<span class="c1"># execute only if run as a script</span> | ||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">main</span><span class="p">())</span> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2021, Jesús M. Navarro.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | ||
provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
|
||
</footer> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<script> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.