Skip to main content

Keep repos organized locally the same as on GitLab

Reason this release was yanked:

Dependency version pinning mistake

Project description

PolyRepo

Work with multiple repos in GitLab.

Manage a collection of repos in a directory/subdirectory structure that matches the group/subgroup structure in GitLab.

Usage (proposed):

polyrepo sync steampunk-wizard

In a subdirectory called steampunk-wizard, clone all its subgroups and projects.

If a subdirectory doesn't exist, create it to hold the clone.

If a subdirectory exists for a project:

  1. Confirm that the default git remote points to the correct path in GitLab
  2. Fetch everything, including tags

If a subdirectory exists that does NOT correspond to a GitLab repo, remove it?

Output in text

/steampunk-wizard/busy                 Created
/steampunk-wizard/labcrawler           Disjoin
/steampunk-wizard/mypyref              Correct  Changed  
/steampunk-wizard/sandbox/ci-sandbox   Fetched
/steampunk-wizard/sandbox/play-around  Missing

Statuses:

  • Created The repo did not previously exist locally, and now has been cloned and fetched.
  • Fetched The repo did exist, and has been fetched
  • Correct Was already up to date; no changes
  • Missing There is no repo in GitLab, but there's a local folder with content
  • Disjoin A local directory exists, but either isn't a git repo or has the wrong default remote

Then Changed means local changes exist, which could include

  • Local branches still to be pushed
  • Commits in a branch beyond what was fetched
  • Local changes to be committed

Note that PolyRepo doesn't pull or merge anything, doesn't touch the working directory except in the case of creation, and ...

There's a .polyrepo file (optional) to specify the subgroups/repos to consider.

Questions

  • How to handle moves of repos between namespaces?
  • Any operation to polyrepo every namespace the user can access?

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

polyrepo-0.1.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

polyrepo-0.1.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

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