Skip to content

Fixes for mepo clone

Compare
Choose a tag to compare
@mathomp4 mathomp4 released this 18 Apr 19:14
· 101 commits to main since this release
63496f7

DOI

This release fixes a bug in mepo clone.

First, it makes the error a bit more clear when you try to mepo clone in a fixture already cloned (see #224):

$ mepo clone git@github.com:GEOS-ESM/MAPL.git
Initializing mepo using components.yaml
ESMA_env   | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild    | (t) geos/v1.2.0
$ cd MAPL
$ mepo clone
fatal: destination path '/Users/mathomp4/Models/MAPL/ESMA_env' already exists and is not an empty directory.

Error! Repo [ESMA_env] already cloned

Note it will always error out with the first repo mepo tries to clone again.

But, it also fixes a bug where you could re-mepo clone in any subdirectory! For example this:

$ mepo clone git@github.com:GEOS-ESM/MAPL.git
Initializing mepo using components.yaml
ESMA_env   | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild    | (t) geos/v1.2.0
$ cd MAPL/shared
$ mepo clone
ESMA_env   | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild    | (t) geos/v1.2.0

should be an obvious failure. But, nope, there was a bug in the code such that what you'd get is an entire new set of subrepos in that subdirectory!

Now the failure is caught:

$ mepo clone git@github.com:GEOS-ESM/MAPL.git
Initializing mepo using components.yaml
ESMA_env   | (t) v3.11.0
ESMA_cmake | (t) v3.10.0
ecbuild    | (t) geos/v1.2.0
$ cd MAPL/shared
$ mepo clone
fatal: destination path '/Users/mathomp4/Models/MAPL/ESMA_env' already exists and is not an empty directory.

Error! Repo [ESMA_env] already cloned

What's Changed

Full Changelog: v1.42.0...v1.43.0