There is a newer version of the record available.

Published December 9, 2022 | Version v1.48.0
Software Open

GEOS-ESM/mepo: Add mepo reset command

  • 1. GMAO SSAI
  • 2. NASA

Contributors

Contact person:

Project leader:

  • 1. GMAO SSAI
  • 2. NASA

Description

This release adds a new mepo reset command:

❯ mepo reset -h
usage: mepo reset [-h] [-f] [--reclone] [-n]

Reset the current mepo clone to the original state.This will delete all subrepos and does not check for uncommitted changes! Must be run in the root of
the mepo clone.

options:
  -h, --help     show this help message and exit
  -f, --force    Force action.
  --reclone      Reclone repos after reset.
  -n, --dry-run  Dry-run only

By default, it will not re-clone a repo and will require a user to answer another question to run (without force flag):

❯ mepo clone
Initializing mepo using components.yaml
ESMA_env   | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild    | (t) geos/v1.3.0
❯ mepo reset
Are you sure you want to reset the project? If so, type 'yes' and press enter. yes
Removing ESMA_cmake/ecbuild...done.
Removing ESMA_cmake...done.
Removing ESMA_env...done.
Removing .mepo...done.
❯ ls -1 ESMA_env | head -1
ls: ESMA_env: No such file or directory

You can do a reclone with --reclone:

❯ mepo clone
Initializing mepo using components.yaml
ESMA_env   | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild    | (t) geos/v1.3.0
❯ mepo reset --reclone -f
Removing ESMA_cmake/ecbuild...done.
Removing ESMA_cmake...done.
Removing ESMA_env...done.
Removing .mepo...done.
Re-cloning all subrepos
Initializing mepo using components.yaml
ESMA_env   | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild    | (t) geos/v1.3.0
Recloning done.
❯ ls -1 ESMA_env | head -1
BASEDIR.rc.in

Note we also require the user to be in the root of a fixture:

❯ mepo clone
Initializing mepo using components.yaml
ESMA_env   | (t) v4.8.0
ESMA_cmake | (t) v3.21.0
ecbuild    | (t) geos/v1.3.0
❯ cd ESMA_cmake/ecbuild
❯ mepo reset
Error! As a safety precaution, you must be in the root directory of the project to reset
What's Changed

Full Changelog: https://github.com/GEOS-ESM/mepo/compare/v1.47.0...v1.48.0

Files

GEOS-ESM/mepo-v1.48.0.zip

Files (81.9 kB)

Name Size Download all
md5:82bac81d0eb48dedb07c1c951f7ee2b3
81.9 kB Preview Download

Additional details

Related works