A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-bash/zsh: mr command not found # Windows (WSL2) sudo apt-get update sudo apt-get install coreutils # Windows (WSL2) sudo apt-get update sudo apt-get install myrepos # Debian apt-get install mr # Ubuntu apt-get install myrepos # Alpine apk add myrepos # Kali Linux apt-get install myrepos # Fedora dnf install myrepos # OS X brew install mr # Raspbian apt-get install myrepos # Dockerfile dockerfile.run/mr # Docker docker run cmd.cat/mr mr
mr 是一个多存储库管理工具。它可以对一组存储库进行签出、更新或执行其他操作,就好像它们是同一个组合存储库一样。它支持 Subversion、Git、CVS、Mercurial、BZR、Darcs 和 Fog 存储库的任意组合,并且可以轻松添加对其他修订控制系统的支持。
mr cds 进入并操作您工作目录中或工作目录中的所有已注册存储库。或者,如果您所在的存储库子目录中不包含其他已注册存储库,它将停留在该目录中,并且只对该存储库进行操作,
mr 由列出存储库的 .mrconfig 文件配置。它首先读取您主目录中的 .mrconfig 文件,然后依次从存储库中链式加载 .mrconfig 文件。它还会自动在当前目录或其父目录中查找 .mrconfig 文件。
mr [options] checkout mr [options] update mr [options] status mr [options] commit [-m "message"] mr [options] record [-m "message"] mr [options] push mr [options] diff mr [options] log mr [options] run command [param ...] mr [options] bootstrap url [directory] mr [options] register [repository] mr [options] config section ["parameter=[value]" ...] mr [options] action [params ...] mr [options] [online|offline] mr [options] remember action [params ...]
-d directory --directory directory Specifies the topmost directory that mr should work in. The default is the current working directory. -c mrconfig --config mrconfig Use the specified mrconfig file. The default is to use both ~/.mrconfig as well as look for a .mrconfig file in the current directory, or in one of its parent directories. -v --verbose Be verbose. -q --quiet Be quiet. This supresses mr's usual output, as well as any output from commands that are run (including stderr output). If a command fails, the output will be shown. -k --insecure Accept untrusted SSL certificates when bootstrapping. -s --stats Expand the statistics line displayed at the end to include information about exactly which repositories failed and were skipped, if any. -i --interactive Interactive mode. If a repository fails to be processed, a subshell will be started which you can use to resolve or investigate the problem. Exit the subshell to continue the mr run. -n [number] --no-recurse [number] If no number if specified, just operate on the repository for the current directory, do not recurse into deeper repositories. If a number is specified, will recurse into repositories at most that many subdirectories deep. For example, with -n 2 it would recurse into ./src/foo, but not ./src/packages/bar. -j [number] --jobs [number] Run the specified number of jobs in parallel, or an unlimited number of jobs with no number specified. This can greatly speed up operations such as updates. It is not recommended for interactive operations. Note that running more than 10 jobs at a time is likely to run afoul of ssh connection limits. Running between 3 and 5 jobs at a time will yield a good speedup in updates without loading the machine too much. -t --trust-all Trust all mrconfig files even if they are not listed in ~/.mrtrust. Use with caution. -p --path This obsolete flag is ignored.
.mrconfig 文件使用 INI
文件格式的变体。以 # 开头的行是注释。可以通过使用空格缩进行来将值延续到下一行。
DEFAULT 部分允许为其后的部分设置默认值。
ALIAS 部分允许为操作添加别名。每个参数都是一个别名,其值是要使用的操作。
mr 注册存储库:
mr register
mr 在 5 个并发作业中更新存储库:
mr -j5 update
mr 打印所有存储库的状态:
mr status
mr 检出所有存储库至最新版本:
mr checkout