mr
myrepos — run version-control commands across many repositories at once
TLDR
SYNOPSIS
mr [options] command [command args]
DESCRIPTION
mr (myrepos) orchestrates version-control operations across a heterogeneous collection of repositories. It reads per-repo action definitions from one or more `.mrconfig` files and runs them, so a single `mr update` can pull dozens of git repos, an svn checkout, and a mercurial clone in one go. Parallel execution (`-j`), timeouts (`-t`), and per-repo `skip` rules make it practical on large fleets.
PARAMETERS
-c CONFIG
Use CONFIG instead of `$HOME/.mrconfig`.-d DIR
Operate only on the repository at DIR (or the closest enclosing one).-t SECONDS
Timeout each sub-command after SECONDS.-j N
Run N jobs in parallel (default 1, `-j0` = unlimited).-s
Stop on first error (also serialize when using `-j`).-i
Interactive: prompt before each action.-n
Limit recursion: only act on repos whose path is under the current directory.-p DIR
Chdir to DIR before running.-f
Force action even on repos that are marked `skip`.-v
Verbose.-q
Quiet: suppress standard output from mr and its children.-m
Commit message (for `commit`).--version
Show version.--help
Show help.
CONFIGURATION
~/.mrconfig (primary) and any `.mrconfig` in the current tree.Sections are per-repo; the `[DEFAULT]` section holds defaults. Commands are defined as shell blocks:
checkout = git clone git@github.com:you/vim .
update = git pull --rebase
skip = [ "$1" = "fetch" ] && ! mr_any_args
COMMON COMMANDS
checkout — clone every repo listed in the config.update — `git pull --rebase` / `svn update` / `hg pull -u` / etc., per-repo.status — show working-tree status for each repo.commit — commit (use `-m` to set a message).push / pull / fetch — VCS-specific wrappers.diff / log — per-repo diff or log.run CMD — run CMD in each repo directory.register [DIR] — add a repo (default: current) to the config.list — show repos that would be acted on.config [REPO] [KEY [VALUE]] — read/write config keys.bootstrap URL — fetch an `.mrconfig` from a URL and run `checkout`.online / offline — mark repos as reachable/unreachable for later `--online-only` runs.help — show help for a specific command.
CAVEATS
Requires Perl. Parallel mode interleaves output; use `-j1` (the default) when you need clean logs. `mr commit` only commits already-staged (or tracked, depending on VCS) changes — it does not add new files.
HISTORY
mr / myrepos was created by Joey Hess and is now maintained by Richard Hartmann (RichiH). It has been packaged in Debian since the late 2000s and is the spiritual ancestor of tools like `vcsh` and `gita`.
