Skip to content
goldy edited this page Apr 9, 2021 · 8 revisions

Dependencies

CI testing is done for every PR with git 2.15, svn 1.8 and python 2.7, 3.4, 3.5 and 3.6.

manage_externals production environments include older version of svn and git, and is generally expected to work with:

  • python
    • python2 > 2.7.z
    • python3 > 3.4.z
  • git - 1.8, 2.3 <= version <= 2.15
  • svn - 1.6.11 <= version <= 1.9.4

Versioning

manage_externals is versioned using semantic versioning. Backwards compatibility for determining version changes is based on the public user interface, i.e. externals description file schema, command line options, supported behavior.

Adding manage_externals to a new repository

The CIME wiki includes details on adding a subtree external to a new repository.

Including manage_externals in other repositories

The most transparent way to deliver manage_externals to users of a repository is to included it in the repository as a git subtree.

The development history of manage_externals is not relevant to most uses of the tool, so the subtree history should be squashed to avoid polluting the client repository with unneeded history and tags.

All tags in manage_externals are annotated tags. Git subtrees and annotated tags have problems in older versions of git. These older versions of git are still common on production machines where manage_externals is developed, tested and used. The recommended workflow for including manage_externals as a subtree is to pull a branch whose head is at the desired tag instead of the tag itself.

git clone [email protected]:ESMCI/manage_externals
cd manage_externals
# if a branch head does not exist at the desired tag/commit
git checkout -b tmp-release manic-v1.0.0
cd ..
git clone [email protected]:some_org/some_repository
cd some_repository
git subtree pull --squash --prefix manage_externals ../manage_externals tmp-release
cd manage_externals/test
make test
cd ../..
# manually verify manage_externals works as expected with the client externals description files
./manage_externals/checkout_externals
./manage_externals/checkout_externals --status
# etc

When you look at the subtree pull log message, the most recent hash in the change list should match the git-subtree-split line, e.g. d6423c6 in the output below.

Squashed 'manage_externals/' changes from 5fc8709..d6423c6

d6423c6 Bugfix: timeout limit for subprocesses
7998f60 Update readme and help output
00b6fb2 Bugfix: add explicit schema version checking
0527869 Update readme
1ae8c84 Merge bugfix branch for stale subexternals into master.
b0c16d7 Bugfix: stale sub-externals after checkout.
30a4e44 Finish implementing system test for mixed-use externals
ac7ff96 Update mixed-use test repo.
bfda7b9 Bugfix: regexp for determining git tracking branches

git-subtree-dir: manage_externals
git-subtree-split: d6423c68f0948329e048d4c317aa3070164225c2

If you see a different hash in the git-subtree-split line, then you probably pulled in an annotated tag. For example 81ccf92e8c4 doesn't match 0527869:

Squashed 'manage_externals/' changes from 5fc8709..81ccf92

0527869 Update readme
1ae8c84 Merge bugfix branch for stale subexternals into master.
b0c16d7 Bugfix: stale sub-externals after checkout.
30a4e44 Finish implementing system test for mixed-use externals
ac7ff96 Update mixed-use test repo.
bfda7b9 Bugfix: regexp for determining git tracking branches

git-subtree-dir: manage_externals
git-subtree-split: 81ccf92e8c4da272121fcc96902021be9e7a7b1f