Skip to main content

Manage multiple repositories

Project description

https://travis-ci.org/TankerApp/tsrc.svg?branch=master https://badge.fury.io/py/tsrc.png

Manage multiple git repos.

Demo

tsrc demo on asciinema.org

Screenshots

  • tsrc sync

https://dmerej.info/blog/pics/tsrc-sync.png
  • tsrc log

https://dmerej.info/blog/pics/tsrc-log.png

Tutorial

Getting started

  • Make sure you are using Python3.3 or higher.

  • Install tsrc with pip3 as usual.

  • Create a manifest repository. (git@example.org/manifest)

  • Push a file named manifest.yml looking like:

    repos:
      - src: foo
        url: git@example.com/foo.git
    
      - src: bar
        url: git@example.com/bar.git
  • Clone the repositories with:

    $ mkdir workspace
    $ cd workspace
    $ tsrc init git@example/manifest.git

In this example:

  • foo will be cloned in <workspace>/foo using git@example.com:foo.git origin url.

  • Similarly, bar will be cloned in <workspace>/bar using git@example.com/bar.git

Managing Merge Requests

  • Generate a token from GitLab

  • Add the http url to the manifest:

    gitlab:
      url: http://gitlab.local
  • Create a ~/.config/tsrc.yml looking like:

    auth:
      gitlab:
        token: <YOUR TOKEN>
  • Start working on your branch

  • Create the pull request:

    $ tsrc push --assignee <an octive user>
  • When the review is done, tell GitLab to merge it once the CI passes:

    $ tsrc push --accept

Differences with google repo

We used repo for a while, but found that tsrc had both a better command line API and a nicer output.

On a less subjective level:

  • Good support for Windows (no need for cygwin or anything like that)

  • GitLab support (automate working with merge requests)

  • Lastly, tsrc tries hard to never do any destructive operation or unexpected actions.

    For instance, tsrc never puts you in a “detached HEAD” state, nor does automatic rebases. It also never touches dirty repos.

    This is achieved by using mostly ‘porcelain’ commands from git, instead of relying on plumbings internals.

Also (and this matters a lot if you think about contribution):

  • Comprehensive test suite

  • Uses PEP8 coding style

  • Written in Python 3, not Python 2

Here are a few features present in repo that are missing from tsrc (but may be implemented in the future)

  • Cloning a specific branch (but see PR #7)

  • Cloning a revision or tag

  • Cloning several repositories in parallel

  • Cloning just one or several groups of repositories

  • Support for other hosting services such as gerrit or github

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

tsrc-0.1.4.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsrc-0.1.4-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file tsrc-0.1.4.tar.gz.

File metadata

  • Download URL: tsrc-0.1.4.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tsrc-0.1.4.tar.gz
Algorithm Hash digest
SHA256 75195a2bc9db6a9b957b776494c040246cfdb38f027341eeb8df26937f24f40f
MD5 4cc6f57df35e4b4fbd4864d311145b37
BLAKE2b-256 98de944da65d127a97f7d03d7a5c9f8cc22405ce164c42e3b5b57c1368a375b7

See more details on using hashes here.

File details

Details for the file tsrc-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: tsrc-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tsrc-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 348581bf11107bdd375b386f05079a4f394994c369b188ba1dfc920f1cd4f87f
MD5 9917a35e6cf8f1614e9789542561987e
BLAKE2b-256 65556005671cb96c81b5c51535288a32655e1ca916006c3831fe8f77e90f382c

See more details on using hashes here.

Supported by

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