Hierarchy
Hierarchy is a simple tool that allows you to clone and maintain an entire hierarchy of Git repository in one single command:
$ hierarchy
TODO: Add picture of
hierarchyin action
Quick-Start
-
Install
$ pip install hierarchy
-
Create the Hierarchy file
$ nano ~/.hierarchy
Sample Hierarchy File
repos: - path: ~/Dev/CliTools url: git@github.com:FlorianKempenich/Hierarchy.git - path: ~/Dev/CliTools url: git@github.com:FlorianKempenich/kata.git - path: ~/Dev/CliTools/DevOps url: git@github.com:FlorianKempenich/ansible-droplet.git - path: ~/Dev/HomeAutomation url: git@github.com:FlorianKempenich/Appdaemon-Test-Framework.git name: appdaemontestframework
-
Run Hierarchy
$ hierarchy
Hierarchy file structure
The Hierarchy file represent the flat hierarchy of all the git repository to clone and maintain.
It consists of a list of entries, under the key repos, each representing a repository to clone.
repos:
- REPO_TO_CLONE_1
- REPO_TO_CLONE_2
- REPO_TO_CLONE_3
Each repository has the following structure:
url: "URL of the project. The same used to clone the repository with `git clone`"
path: "The local path where to clone the repository. It can contain `~` to represent HOME"
name: "OPTIONAL - A name to override the default repository name when cloning"
The repository will be cloned at: path/name
If no name is provided, the repository name will be used.
A sample Hierarchy file might look like this:
repos:
- path: ~/Dev/CliTools
url: git@github.com:FlorianKempenich/Hierarchy.git
- path: ~/Dev/CliTools
url: git@github.com:FlorianKempenich/kata.git
- path: ~/Dev/CliTools/DevOps
url: git@github.com:FlorianKempenich/ansible-droplet.git
- path: ~/Dev/HomeAutomation
url: git@github.com:FlorianKempenich/Appdaemon-Test-Framework.git
name: appdaemontestframework
Options
-
-f/--file HIERARCHY_FILEA hierarchy file to use.
Default:~/.hierarchy -
-v/--verboseEnable verbose mode
-
--helpShow help
Work In Progress
- Allow for
~in thepath - Create directories if do not exist
- Clone with all submodules
- If directory exists and not empty:
- Is not same repo => Skip and notify user (ERROR)
- Is not repo => Skip and notify user (ERROR)
- Is correct repo:
- Has no local modifications and up to date with remote =>
- Update (pull)
- Update with all submodules
- Has local modifications => Skip and notify user (WARN)
- Is not up to date with remote => Skip and notify user (WARN)
- Has no local modifications and up to date with remote =>
Metadata
Release files for hierarchy 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hierarchy-0.4.0.tar.gz | 4.0 kB | Without provenance | Details |
Release files / hierarchy-0.4.0.tar.gz
| Download URL | hierarchy-0.4.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
554aae64de700170491efbc63963198364c8ef7790fc67f5ebf1162128634447
|
|
BLAKE2b-256 checksum How to use checksums |
2b81421ffe6068793a933e0589dc25224b65b4d722c2ef74402596a54d48e336
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0a4+
|
Security for hierarchy 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.