Skip to content

Mepo Commands

Matthew Thompson edited this page Oct 18, 2022 · 15 revisions

Table of Contents

Overview

mepo provides many different commands for working with a multi-repository fixture.

Commands

branch create

Create branch in component

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

Optional Arguments

  -h, --help   show this help message and exit

branch delete

Delete branch in component

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

  -h, --help   show this help message and exit
  --force      Delete branch even if it has not been fully merged

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

  -h, --help  show this help message and exit
  -a, --all   list all (local+remote) branches

changed-files

List files that have changes versus the state. By default runs against all components.

Usage

mepo changed-files [-h] [--full-path] [comp-name [comp-name ...]]

Positional Arguments

  comp-name    Component to list branches in

Optional Arguments

  -h, --help   show this help message and exit
  --full-path  Print with full path

checkout

Switch to branch/tag branch-name in component comp-name. If no components listed, checkout from all. Specifying -b causes the branch branch-name to be created and checked out.

Usage

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

Positional Arguments

  branch-name  Name of branch
  comp-name    Components to checkout branch in

Optional Arguments

  -h, --help   show this help message and exit
  -b           create the branch
  -q, --quiet  Suppress prints
  --detach     Detach upon checkout

checkout-if-exists

Switch to branch or tag ref-name in any component where it is present.

Usage

mepo checkout-if-exists [-h] [-q] [--detach] [-n] ref-name

Positional Arguments

  ref-name       Name of branch or tag

Optional Arguments

  -h, --help     show this help message and exit
  -q, --quiet    Suppress prints
  --detach       Detach on checkout
  -n, --dry-run  Dry-run only (lists repos where branch exists)

clone

Clone repositories.

Usage

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

Positional Arguments

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

Optional Arguments

  -h, --help            show this help message and exit
  --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)
  --style [style-type]  Style of directory file, default: prefix, allowed options: naked, prefix, postfix (ignored if init already called)
  --allrepos            Must be passed with -b/--branch. When set, it not only checkouts out the branch/tag for the fixture, but for all the subrepositories as well.

commit

Commit staged files in the specified components

Usage

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

Positional Arguments

  comp-name             Component to commit file in

Optional Arguments

  -h, --help            show this help message and exit
  -a, --all             Stage all tracked files and then commit
  -m message, --message message
                        Message to commit with

compare

Compare current and original states of all components. Will only show differing repos unless --all is passed in

Usage

mepo compare [-h] [--all] [--nocolor] [--wrap]

Optional Arguments

  -h, --help  show this help message and exit
  --all       Show all repos, not only differing repos
  --nocolor   Tells command to not display colors.
  --wrap      Tells command to ignore terminal size and wrap

config delete

Delete config entry in .mepoconfig. Note this uses gitconfig style where entry is of the form section.option. So to delete an alias st You would run mepo config delete alias.st

Usage

mepo config delete [-h] entry

Positional Arguments

  entry       Entry to delete.

Optional Arguments

  -h, --help  show this help message and exit

config get

Get config entry in .mepoconfig. Note this uses gitconfig style where entry is of the form section.option. So to get an alias st You would run mepo config get alias.st

Usage

mepo config get [-h] entry

Positional Arguments

  entry       Entry to display.

Optional Arguments

  -h, --help  show this help message and exit

config print

Print contents of .mepoconfig

Usage

mepo config print [-h]

Optional Arguments

  -h, --help  show this help message and exit

config set

Set config entry to value in .mepoconfig. Note this uses gitconfig style where entry is of the form section.option. So to set an alias for status of st You would run mepo config set alias.st status

Usage

mepo config set [-h] entry value

Positional Arguments

  entry       Entry to set.
  value       Value to set entry to.

Optional Arguments

  -h, --help  show this help message and exit

develop

Checkout current version of 'develop' branches of specified components

Usage

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

Positional Arguments

  comp-name    Component(s) to checkout development branches

Optional Arguments

  -h, --help   show this help message and exit
  -q, --quiet  Suppress prints

diff

Diff all components

Usage

mepo diff [-h] [--name-only] [--name-status] [--ignore-permissions] [--staged] [-b] [comp-name [comp-name ...]]

Positional Arguments

  comp-name             Component to list branches in

Optional Arguments

  -h, --help            show this help message and exit
  --name-only           Show only names of changed files
  --name-status         Show name-status of changed files
  --ignore-permissions  Tells command to ignore changes in file permissions.
  --staged              Show diff of staged changes
  -b, --ignore-space-change
                        Ignore changes in amount of whitespace

fetch

Download objects and refs from in component comp-name. If no components listed, fetches from all

Usage

mepo fetch [-h] [--all] [-p] [-t] [-f] [comp-name [comp-name ...]]

Positional Arguments

  comp-name    Components to fetch in

Optional Arguments

  -h, --help   show this help message and exit
  --all        Fetch all remotes.
  -p, --prune  Prune remote branches.
  -t, --tags   Fetch tags.
  -f, --force  Force action.

init

Initialize mepo based on config-file

Usage

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

Optional Arguments

  -h, --help            show this help message and exit
  --config [config-file]
                        default: components.yaml
  --style [style-type]  Style of directory file, default: prefix, allowed options: naked, prefix, postfix

list

List all components that are being tracked

Usage

mepo list [-h]

Optional Arguments

  -h, --help  show this help message and exit

pull

Pull branches of specified components

Usage

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

Positional Arguments

  comp-name    Components to pull in

Optional Arguments

  -h, --help   show this help message and exit
  -q, --quiet  Suppress prints

pull-all

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

Usage

mepo pull-all [-h] [-q]

Optional Arguments

  -h, --help   show this help message and exit
  -q, --quiet  Suppress prints

push

Push local commits to remote for specified component. Use mepo tag push to push tags

Usage

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

Positional Arguments

  comp-name   Component to push to remote

Optional Arguments

  -h, --help  show this help message and exit

restore-state

Restores all components to the last saved state.

Usage

mepo restore-state [-h]

Optional Arguments

  -h, --help  show this help message and exit

save

Save current state in a yaml config file

Usage

mepo save [-h] [config-file]

Positional Arguments

  config-file  default: components-new.yaml

Optional Arguments

  -h, --help   show this help message and exit

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

  -h, --help   show this help message and exit
  --untracked  Stage untracked files as well

stash apply

apply stash in component

Usage

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

Positional Arguments

  comp-name   Component to apply stash in

Optional Arguments

  -h, --help  show this help message and exit

stash list

List local stashes of all components

Usage

mepo stash list [-h]

Optional Arguments

  -h, --help  show this help message and exit

stash pop

Pop stash in component

Usage

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

Positional Arguments

  comp-name   Component to pop stash in

Optional Arguments

  -h, --help  show this help message and exit

stash push

Push (create) stash in component

Usage

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

Positional Arguments

  comp-name             Component to push stash in

Optional Arguments

  -h, --help            show this help message and exit
  -m message, --message message
                        Message for the stash

stash show

show stash in component

Usage

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

Positional Arguments

  comp-name    Component to show stash in

Optional Arguments

  -h, --help   show this help message and exit
  -p, --patch  Message for the stash

status

Check current status of all components

Usage

mepo status [-h] [--ignore-permissions] [--nocolor]

Optional Arguments

  -h, --help            show this help message and exit
  --ignore-permissions  Tells command to ignore changes in file permissions.
  --nocolor             Tells status to not display colors.

tag create

Create tag in component . If no component is specified, runs over all components

Usage

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

Positional Arguments

  tag-name              Name of tag
  comp-name             Component to create tags in

Optional Arguments

  -h, --help            show this help message and exit
  -a, --annotate        Make an annotated tag
  -m message, --message message
                        Message for the tag

tag delete

Delete tag in component . If no component is specified, runs over all components

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

Optional Arguments

  -h, --help  show this help message and exit

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

Optional Arguments

  -h, --help  show this help message and exit

tag push

Push tag in component . If no component is specified, runs over all components

Usage

mepo tag push [-h] [-f] tag-name [comp-name [comp-name ...]]

Positional Arguments

  tag-name     Name of tag
  comp-name    Component to push tags in

Optional Arguments

  -h, --help   show this help message and exit
  -f, --force  Force push (be careful!)

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   Component to unstage in

Optional Arguments

  -h, --help  show this help message and exit

whereis

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

Usage

mepo whereis [-h] [-i] [comp-name]

Positional Arguments

  comp-name          Component to get location of

Optional Arguments

  -h, --help         show this help message and exit
  -i, --ignore-case  Ignore case for whereis
Clone this wiki locally