Skip to main content

Supplements to the repo script

Project description

Repo Find Orphans

This is a small tool that complements Google's repo project repository management tool. The problem it tries to solve is that developers occasionally add subprojects to the repository without first registering them in the repo manifest. This is not a recommended activity in the repo workflow, but it happens frequently in large teams. These unregistered directories become orphans, which means the repo tool ignores them during synchronization and updates. This tool addresses this issue by identifying these orphan directories, which developers can choose to include in the project manifest for tracking in the future.

Installation

There are two ways to install this tool:

  1. Using pip: this will install the tool into your active virtual environment or to the the global python environment. To install with pip use the following command
   pip install repo-find-orphans
  1. Using pipx: If you want to keep your Python global environment clean or install Python CLI tools in isolated environments use the pipx option.
  • First make sure pipx is installed
pip install pipx
  • Then install the tool
pipx install repo-find-orphans

This will create a dedicated virtual environment for the tool and add the executable script to your ~/.local/bin

Usage

After installing Repo Find Orphans, use the provided command-line interface to search for orphan directories. Here's how you use the tool:

Open your terminal and enter the following command.

repository-find-orphans PATH_TO_MANIFEST PATH_TO_PROJECT_DIR

replace PATH_TO_MANIFEST with your manifest file's path, which is usually repo/default.xml, and PATH_TO_PROJECT_DIR with the path to your project directory.

For example:

repo-find-orphans ./repo/default.xml .

This will scan the project directory and will try to find all projects in the project manifest file. Then it will print the list of projects that exists in the directory, but not mentioned in the manifest. You can review this output and add the missing projects to the manifest.

Troubleshooting

If you installed your tool using pipx, but get the command not found error when you are trying to run it check that ~/.local/bin is in your shell search path. If it is not, run pipx ensurepath to fix this

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_find_orphans-0.0.5.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

repo_find_orphans-0.0.5-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file repo_find_orphans-0.0.5.tar.gz.

File metadata

  • Download URL: repo_find_orphans-0.0.5.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.2 Darwin/22.4.0

File hashes

Hashes for repo_find_orphans-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a5006d9103a85d65aa21f45340ac817cc15d2526c6be4c33304e981766ebff89
MD5 67597898ebb69e8ad1019cfbb164808e
BLAKE2b-256 c8fbb9024dcb3442fbb53105dd3a9dfec45a8323cceee8f3fce34c2fe833535e

See more details on using hashes here.

File details

Details for the file repo_find_orphans-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for repo_find_orphans-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b370ba362bb0705b65162c885062ba83b54101ff69fee0b01f6f448f17e79b04
MD5 9be88653c5b3a0041bed32271e3a4671
BLAKE2b-256 5c2b923ddf324a1659390251b576599ca83c8d3e1edf9b5c4c92f74cd8c25d61

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page