Skip to content

Mepo Commands

Matthew Thompson edited this page Nov 16, 2020 · 15 revisions

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.

Table of Contents

init

Initialize mepo based on <config-file>

Usage

mepo init [-h] [--config [config-file]]

Optional arguments

--config [config-file]

  • default: components.yaml

clone

Clone repositories.

Usage

mepo clone [-h] [--branch [name]] [--config [config-file]] [URL] [directory]

Positional arguments:

URL

  • URL to clone

directory

  • Directory to clone into (Only allowed with URL!)

Optional arguments:

--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

List all components that are being tracked

Usage

mepo list [-h]

status

Check current status of all components

Usage

usage: mepo status [-h]

diff

Diff components

Usage

mepo diff [-h] [--name-only] [--staged] [comp-name [comp-name ...]]

Positional arguments

comp-name

  • Component to list branches in (if not provided, diff all components)

Optional arguments

--name-only

  • Show only names of changed files

--staged

  • Show diff of staged changes

checkout

Switch to branch <branch-name> in component <comp-name>. Specifying -b causes the branch <branch-name> to be created in the specified component(s).

Usage

mepo checkout [-h] [-b] branch-name comp-name [comp-name ...]

Positional arguments:

branch-name

comp-name

Optional arguments:

-b

  • create the branch

checkout-if-exists

Switch to branch <branch-name> in any component where it is present.

Usage

mepo checkout-if-exists [-h] [--quiet] [--dry-run] branch-name

Positional arguments:

branch-name

Optional arguments:

--quiet

  • Suppress found messages

--dry-run, -n

  • Dry-run only (lists repos where branch exists)

branch

Runs branch commands. Has three subcommands: list, create, delete

branch list

List local branches. If no component is specified, runs over all components

Usage

mepo branch list [-h] [-a] [comp-name [comp-name ...]]

Positional arguments

comp-name

  • Component to list branches in

Optional arguments

-a, --all

  • list all (local+remote) branches

branch create

Create branch <branch-name> in component <comp-name>

Usage

mepo branch create [-h] branch-name comp-name [comp-name ...]

Positional arguments

branch-name

  • Name of branch

comp-name

  • Component to create branches in

branch delete

Delete branch <branch-name> in component <comp-name>

Usage

mepo branch delete [-h] [--force] branch-name comp-name [comp-name ...]

Positional arguments

branch-name

  • Name of branch

comp-name

  • Component to delete branches in

Optional arguments

--force

  • Delete branch even if it has not been fully merged

develop

Checkout current version of 'develop' branches of specified components

Usage

mepo develop [-h] comp-name [comp-name ...]

Positional arguments

comp-name

  • Name of component

compare

Compare current and original states of all components

Usage

mepo compare [-h]

whereis

Get the location of component relative to my current location. If <comp-name> is not present, get the relative locations of ALL components.

Usage

mepo whereis [-h] [comp-name]

Positional arguments

comp-name

  • Name of component

stage

Stage modified & untracked files in the specified component(s)

Usage

mepo stage [-h] [--untracked] comp-name [comp-name ...]

Positional arguments

comp-name

  • Component to stage file in

Optional arguments

--untracked

  • stage untracked files as well

unstage

Un-stage staged files. If a component is specified, files are un-staged only for that component.

Usage

mepo unstage [-h] [comp-name [comp-name ...]]

Positional arguments

comp-name

  • Name of component

commit

Commit staged files in the specified components

Usage

mepo commit [-h] [-m message] comp-name [comp-name ...]

Positional arguments

comp-name

  • Component to commit in

Optional arguments

-m message, --message message

  • Commit with (if not provided $GITEDITOR will be launched)

push

Push local commits or tags to remote

Usage

mepo push [-h] [--tags] comp-name [comp-name ...]

Positional arguments

comp-name

  • Component to push to remote

Optional arguments

--tags

  • push tags

save

Save current state in a yaml config file

Usage

mepo save [-h] [config-file]

Positional arguments

config-file

  • default: components-new.yaml

tag

Runs tag commands. Has three subcommands: list, create, delete

tag list

List tags. If no component is specified, runs over all components

Usage

mepo tag list [-h] [comp-name [comp-name ...]]

Positional arguments

comp-name

  • Component to list tags in

tag create

Create tag <tag-name> in component <comp-name>

Usage

mepo tag create [-h] [-a] [-m message] tag-name comp-name [comp-name ...]

Positional arguments

tag-name

  • Name of the tag

comp-name

  • Component to create tags in

Optional arguments

-a, --annotate

  • Make an annotated tag

-m message, --message message

  • Message for the tag

tag delete

Delete tag <tag-name> in component <comp-name>

Usage

mepo tag delete [-h] tag-name comp-name [comp-name ...]

Positional arguments

tag-name

  • Name of tag

comp-name

  • Component to delete tags in

stash

Runs stash commands. Has five subcommands: push, list, pop, apply, show

stash push

Push (create) stash in component <comp-name>

Usage

mepo stash push [-h] [-m message] comp-name [comp-name ...]

Positional arguments

comp-name

  • Component to push stash in

Optional arguments

-m message, --message message

  • Message for the stash

stash list

List local stashes of all components

Usage

mepo stash list [-h]

stash pop

Pop stash in component <comp-name>

Usage

mepo stash pop [-h] comp-name [comp-name ...]

Positional arguments

comp-name

  • Component to pop stash in

stash apply

apply stash in component <comp-name>

Usage

mepo stash apply [-h] comp-name [comp-name ...]

Positional arguments

comp-name

  • Component to apply stash in

stash show

Show stash in component <comp-name>

Usage

mepo stash show [-h] [-p] comp-name [comp-name ...]

Positional arguments

comp-name

  • Component to show stash in

Optional arguments

-p, --patch

  • Message for the stash

fetch

Download objects and refs from in component <comp-name>. Specifying --all causes all remotes to be fetched.

Usage

mepo fetch [-h] [--all] [--prune] [--tags] comp-name [comp-name ...]

Positional arguments

comp-name

  • Name of component

Optional arguments

--all

  • Fetch all remotes.

--prune, -p

  • Prune remote branches.

--tags, -t

  • Fetch tags.

fetch-all

Download objects and refs from all components. Specifying --all causes all remotes to be fetched.

Usage

mepo fetch-all [-h] [--all] [--prune] [--tags]

Optional arguments

--all

  • Fetch all remotes.

--prune, -p

  • Prune remote branches.

--tags, -t

  • Fetch tags.

pull

Pull branches of specified components

Usage

mepo pull [-h] comp-name [comp-name ...]

Positional arguments

comp-name

  • Name of component

pull-all

Pull branches of all components (only those in non-detached HEAD state)

Usage

mepo pull-all [-h]

restore-state

Restores all components to the last saved state.

Usage

mepo restore-state [-h]
Clone this wiki locally