Skip to main content

Repoman

Repoman is a python library designed to automate repository operations in release processes.

It provides a unified API to work with different SCMs, and the mechanisms to quickly have ready and clean working copies. It currently supports git and mercurial.

There are some basic concepts that are needed to start working with Repoman:

  • A Repository is an instance with the usual operations of a SCM.

  • A Depot contains a repository, and the operations to interact with Repoman managers.

  • A DepotManager provides Depots with an specific code, each DepotManager is intended to manage Depots of the same project.

  • Each Depot is locked to the task that requests it to the manager and belongs to this task till it’s freed.

But the best way to see how it works is with an example:

from repoman import depot_manager

repo_kind = 'git'
repo_url = 'https://github.com/tuenti/python-repoman.git'

manager = depot_manager.DepotManager(repo_kind=repo_kind)

depot = manager.give_me_depot('task_id', 'Owner task name')

try:
    depot.request_refresh({ repo_url: ['master'] })

    # Do work...
    depot.repository.tag('example')
    # ...

    # If you were going to continue the task in other process,
    # it needs to receive the path of the depot to request it
    depot = manager.give_me_depot_from_path(depot.path)
    assert 'example' in depot.repository.tags()

finally:
    # And when the repository is not needed anymore, free its depot
    manager.free_depot(depot, 'task_id')

You can know more by looking to the examples in the doc/examples directory, and to the full API reference.

Installation

Repoman is intended to be used as part of a more complex release automation infrastructure, it requires a quite specific set of dependencies, see Requirements section to know more about this.

To install it in your development environment, you can use pip:

pip install -e git+https://github.com/tuenti/python-repoman.git@v0.6#egg=repoman

To install it in your production environment, it’s recommended to generate your own packages, usual tools can be used for that, e.g:

python setup.py bdist_egg

Requirements

Repoman should play well with any Linux distribution with Python > 2.6, it’s daily used in Debian, and has been also tested in Ubuntu and Fedora.

As a general rule, pip install -r requirements.txt is able to install everything, but some things need to be taken into account.

pygit2 needs to be compiled, for that you need a gcc toolchain and the development files of libgit2 (see pygit2 installation notes). You have to use the same version of pygit2 and libgit2. Currently repoman only works with 0.20 series. It’s recommended to prepare your own set of pre-built packages for your production enviroment.

mercurial > 2.1 is also required, as well as python-hglib, the version specified in the requirements.txt file should be fine.

Some Dockerfiles are provided in the docker directory that can serve as examples about how to prepare an environment to work with repoman in different distributions.

Credits & Contact

Repoman was created by Tuenti Technologies S.L.. You can follow Tuenti engineering team on Twitter @tuentieng.

License

Repoman is available under the Apache License, Version 2.0. See LICENSE file for more info.

Metadata

Release files for repoman-scm 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repoman-scm 0.7.1
File Size Uploaded Provenance
repoman-scm-0.7.1.tar.gz 32.2 kB Without provenance Details

Release files / repoman-scm-0.7.1.tar.gz

Download URL repoman-scm-0.7.1.tar.gz
Size 32.2 kB
Tags Source
SHA-256 checksum
How to use checksums
05569cfd39179ba784e423c0dcbdb9d086f84548899688401fa3cfd4233c632f
BLAKE2b-256 checksum
How to use checksums
c32559b9b362cbafb0762cc66ed1493a4b53342d55c0eaf10389a62282c14639
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for repoman-scm 0.7.1

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.

Release history Release notifications | RSS feed

This release

0.7.1 This release

1 release file No provenance

0.6.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page