-
Notifications
You must be signed in to change notification settings - Fork 2
Mepo Commands
mepo provides many different commands for working with a multi-repository fixture.
Note that all the below commands support a -h
or --help
option that returns the usage for that subcommand. For clarity, this option is not listed here.
- init
- clone
- list
- status
- diff
- checkout
- checkout-if-exists
- branch
- develop
- compare
- whereis
- stage
- unstage
- commit
- push
- save
- tag
- stash
- fetch
- fetch-all
- pull
- pull-all
- restore-state
Initialize mepo based on <config-file>
mepo init [-h] [--config [config-file]]
--config [config-file]
- default:
components.yaml
Clone repositories.
mepo clone [-h] [--branch [name]] [--config [config-file]] [URL] [directory]
URL
- URL to clone
directory
- Directory to clone into (Only allowed with URL!)
--branch [name], -b [name]
- Branch/tag of URL to initially clone (Only allowed with URL!)
--config [config-file]
- Configuration file (ignored if init already called, default:
components.yaml
)
List all components that are being tracked
mepo list [-h]
Check current status of all components
usage: mepo status [-h]
Diff components
mepo diff [-h] [--name-only] [--staged] [comp-name [comp-name ...]]
comp-name
- Component to list branches in (if not provided, diff all components)
--name-only
- Show only names of changed files
--staged
- Show diff of staged changes
Switch to branch <branch-name>
in component <comp-name>
. Specifying -b
causes the branch <branch-name>
to be created in the specified component(s).
mepo checkout [-h] [-b] branch-name comp-name [comp-name ...]
branch-name
comp-name
-b
- create the branch
Switch to branch <branch-name>
in any component where it is present.
mepo checkout-if-exists [-h] [--quiet] [--dry-run] branch-name
branch-name
--quiet
- Suppress found messages
--dry-run, -n
- Dry-run only (lists repos where branch exists)
Runs branch commands. Has three subcommands: list, create, delete
List local branches. If no component is specified, runs over all components
mepo branch list [-h] [-a] [comp-name [comp-name ...]]
comp-name
- Component to list branches in
-a, --all
- list all (local+remote) branches
Create branch <branch-name>
in component <comp-name>
mepo branch create [-h] branch-name comp-name [comp-name ...]
branch-name
- Name of branch
comp-name
- Component to create branches in
Delete branch <branch-name>
in component <comp-name>
mepo branch delete [-h] [--force] branch-name comp-name [comp-name ...]
branch-name
- Name of branch
comp-name
- Component to delete branches in
--force
- Delete branch even if it has not been fully merged
Checkout current version of 'develop' branches of specified components
mepo develop [-h] comp-name [comp-name ...]
comp-name
- Name of component
Compare current and original states of all components
mepo compare [-h]
Get the location of component relative to my current location. If <comp-name>
is not present, get the relative locations of ALL
components.
mepo whereis [-h] [comp-name]
comp-name
- Name of component
Stage modified & untracked files in the specified component(s)
mepo stage [-h] [--untracked] comp-name [comp-name ...]
comp-name
- Component to stage file in
--untracked
- stage untracked files as well
Un-stage staged files. If a component is specified, files are un-staged only for that component.
mepo unstage [-h] [comp-name [comp-name ...]]
comp-name
- Name of component
Commit staged files in the specified components
mepo commit [-h] [-m message] comp-name [comp-name ...]
comp-name
- Component to commit in
-m message, --message message
- Commit with (if not provided
$GITEDITOR
will be launched)
Push local commits or tags to remote
mepo push [-h] [--tags] comp-name [comp-name ...]
comp-name
- Component to push to remote
--tags
- push tags
Save current state in a yaml config file
mepo save [-h] [config-file]
config-file
- default: components-new.yaml
Runs tag commands. Has three subcommands: list, create, delete
List tags. If no component is specified, runs over all components
mepo tag list [-h] [comp-name [comp-name ...]]
comp-name
- Component to list tags in
Create tag <tag-name>
in component <comp-name>
mepo tag create [-h] [-a] [-m message] tag-name comp-name [comp-name ...]
tag-name
- Name of the tag
comp-name
- Component to create tags in
-a, --annotate
- Make an annotated tag
-m message, --message message
- Message for the tag
Delete tag <tag-name>
in component <comp-name>
mepo tag delete [-h] tag-name comp-name [comp-name ...]
tag-name
- Name of tag
comp-name
- Component to delete tags in
Runs stash commands. Has five subcommands: push, list, pop, apply, show
Push (create) stash in component <comp-name>
mepo stash push [-h] [-m message] comp-name [comp-name ...]
comp-name
- Component to push stash in
-m message, --message message
- Message for the stash
List local stashes of all components
mepo stash list [-h]
Pop stash in component <comp-name>
mepo stash pop [-h] comp-name [comp-name ...]
comp-name
- Component to pop stash in
apply stash in component <comp-name>
mepo stash apply [-h] comp-name [comp-name ...]
comp-name
- Component to apply stash in
Show stash in component <comp-name>
mepo stash show [-h] [-p] comp-name [comp-name ...]
comp-name
- Component to show stash in
-p, --patch
- Message for the stash
Download objects and refs from in component <comp-name>
. Specifying --all
causes all remotes to be fetched.
mepo fetch [-h] [--all] [--prune] [--tags] comp-name [comp-name ...]
comp-name
- Name of component
--all
- Fetch all remotes.
--prune, -p
- Prune remote branches.
--tags, -t
- Fetch tags.
Download objects and refs from all components. Specifying --all
causes all remotes to be fetched.
mepo fetch-all [-h] [--all] [--prune] [--tags]
--all
- Fetch all remotes.
--prune, -p
- Prune remote branches.
--tags, -t
- Fetch tags.
Pull branches of specified components
mepo pull [-h] comp-name [comp-name ...]
comp-name
- Name of component
Pull branches of all components (only those in non-detached HEAD state)
mepo pull-all [-h]
Restores all components to the last saved state.
mepo restore-state [-h]