Code Monkey home page Code Monkey logo

repoman's Introduction

Avatar

Build Status Dependencies Status Coverage Status Published Version
npm Badge

Repoman

Multi-repository management command-line tool.

This is handy when you're working on multiple SCM repositories and/or on multiple computers. E.g. rather than updating each repository one by one, it's easier to just run repoman get and update all of them in one go. Rather than checking for uncommitted local changes one by one, it's easier to just run repoman changes and check all in one go. And if you often switch between multiple computers, simply use the same .repoman.json file on those computers and easily manage the same set of repositories.

If you are a GitHub user, you can use Repoman to clone all of your repositories from GitHub with a one liner: repoman --github-user <user> && repoman init .

Installation

npm install -g repoman

Usage

Create sample .repoman.json configuration file:

repoman config

Create .repoman.json containing GitHub projects of a user:

repoman config --github-user cliffano

Create .repoman.json containing GitHub projects of an organisation:

repoman config --github-org jenkinsci

Create .repoman.json containing GitHub projects of multiple users and organisations:

repoman config --github-user cliffano --github-org jenkinsci,github

Create .repoman.json containing Bitbucket projects:

repoman config --bitbucket-auth-user cliffano --bitbucket-auth-pass somepassword

Create .repoman.json configuration file from local repositories in current directory:

repoman config --local

Initialise local repositories:

repoman init

Update local repositories with changes from remote repositories:

repoman get

Display the changes in local repositories:

repoman changes

Update remote repositories with changes from local repositories:

repoman save

Delete local repositories:

repoman delete

Delete non-Repoman local repositories:

repoman clean

Remove uncommitted changes from local repositories:

repoman undo

Execute custom command against local repositories:

repoman exec 'touch .gitignore; echo "Created {workspace}/{name}/.gitignore file;"'

Execute custom command and exit as soon as there is any command failure:

repoman --fail-fast exec 'chown -R user:group /some/path/{name}';

Write repository names to standard output and pipe to another command:

repoman list | parallel nestor build {}

Override default .repoman.json configuration file:

repoman -c somerepoman.json init|get|changes|save|delete|clean|exec|list

Filter repositories by tags, if multiple tags (comma-separated) are specified then repo will be included if it matches at least one tag:

repoman --tags apache,github init|get|changes|save|delete|exec|list

Filter repositories by regex against repo name or URL:

repoman --regex .*github.* init|get|changes|save|delete|exec|list

Repoman uses the following SCM command mapping, it currently only supports Git and Subversion:

Repoman Git Subversion
repoman init git clone {url} svn checkout {url}
repoman get git pull svn up
repoman changes git status svn stat
repoman save git push origin master svn commit -m "Commited by Repoman"
repoman undo git stash + git stash clear svn revert -R .
.

Configuration

Repositories can be configured in .repoman.json file:

{
  "couchdb": {
    "type": "git",
    "url": "http://git-wip-us.apache.org/repos/asf/couchdb.git",
    "tags": ["apache", "database"]
  },
  "httpd": {
    "type": "svn",
    "url": "http://svn.apache.org/repos/asf/httpd/httpd/trunk/",
    "tags": ["apache", "webserver"]
  },
  "node": {
    "type": "git",
    "url": "http://github.com/joyent/node",
    "tags": ["github", "javascript"]
  }
}

Type property is optional. If not provided, Repoman will try to determine the type from the URL by checking the existence of keywords: git, svn, subversion. If type can't be determined from the URL, it defaults to git.

Repoman will choose which configuration file to use in this order:

  1. Any file specified in -c/--config-file flag
  2. .repoman.json file in the current directory
  3. .repoman.json file in home directory (process.env.USERPROFILE on Windows, process.env.HOME on *nix)

Colophon

Developer's Guide

Build reports:

Articles:

repoman's People

Contributors

cliffano avatar faandi avatar stennie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.