Why subtree for CIME?
...
direction | commit on master and date merged. PR link. | feature branch that was merged to master | how feature branch was created | notes |
---|---|---|---|---|
merge ESMCI to ACME | in ACME: /rljacob/cime/cime5-upgrade | in ACME: First removed cime2 in 8ed674f84ce Then did a subtree merge squash of 0eb331d in 7d7641505cc That squash was merge-committed to the branch in 15abd5853 | brought in CIME5.1.4 Did a bunch more commits on that branch to get everything working. | |
split ACME to ESMCI | git subtree split c50a810d95442^.. --onto=0eb331d371 --prefix=cime/ -b rljacob/split-cime51-5 | send ACME's CIME5.1 changes to ESMCI | ||
merge ESMCI to ACME | in ACME rljacob/cime/uptocime5.2.0 | brought in CIME5.2.0 215e459 is commit in ESMCI last brought to ACME, which is the 5.2.0 tag | ||
split ACME to ESMCI | 2 on ESMCI: agsalin/cime52-with-acmesplit-03292017 acme commits merged to CIME 5.2 agsalin/merge-from-acme-03292017 Commits merged with ESMCI master | Starting from ACME master, commit f255704 by Az on March 28.
| Send ACME's CIME5.2 changes to ESMCI (Acme changes as of 2017-03-29 since last split) Notes: 628a26d is first commit in ACME after last merge Branch agsalin/split-03292017 not pushed (acme code sizeof cime repo?) | |
merge ESMCI back to ACME | On ACME: agsalin/update-to-cime5.3 | git checkout -b agsalin/update-to-cime5.3 git fetch esmcicime git subtree pull --prefix=cime esmcicime master | Brought in CIME 5.3.0-alpha06 CIME master hash: 6156e0a tag: cime5.3.0-alpha.06-toacme01 To facilitate merge, I first moved all ACME files to the new cime dir name, before subtree pull. Brought in entire CIME commit history. | |
merge ESMCI to ACME | On ACME: agsalin/update-to-cime5.3.1 started 5/2/2107 | same as above | Brought in CIME 5.3.0-alpha.10 CIME master hash: 15297cd tag: cime5.3.0-alpha.10-toacme01 merge more ESMCI changes to ACME, without doing ACME→ESMCI first. | |
split ACME to ESMCI | ACME commit: acme-split-06-01-2017 onto ESMCI commit: cime5.3.0-alpha.10-toacme01 | Change instructions to use tags | ||
merge ESMCI to ACME | in ACME 2a095e62 11 Oct 2017 | On ACME: jgfouca/update_to_cime_5.3.0.34 | same as in previous ESMCI→ACME merges | brought in CIME 5.3.0.alpha34 |
split ACME to ESMCI | Make script |
...
Code Block |
---|
This setting can be needed. $ git config merge.renameLimit 999999 get ACME code $ git clone git@github.com:ACME-Climate/ACME.git $ cd ACME Add ESMCI/CIME as an additional remote. $ git remote add esmcicime git@github.com:ESMCI/CIME.git $ git fetch esmcicime --tags Make a tag to mark split-point, it can be deleted once there's a new split point $ git tag acmee3sm2cime-split-MM-DD-YYYY $ git push origin acmee3sm2cime-split-MM-DD-YYYY Create cime subtree of ACME. You will still be in a directory called ACME, but it will now have the cime dir contents NOTE: mm-dd-yyyy is the date of the PREVIOUS split CIME5.2.0 is tag of last pull from ESMCI $ git subtree split acme-split-mm-dd-yyyy.. --prefix=cime --onto=CIME5.2.0 --ignore-joins -b $USER/split-MMDDYYYY Create a branch off of the CIME tag that ACME last incorporated, and merge the acme/cime subtree changes onto that branch. NOTE: YOU NEED TO PICK THE CORRECT TAG HERE $ git checkout -b $USER/cime52-with-acmesplit-MMDDYYYY CIME5.2.0 $ git merge -X rename-threshold=25 $USER/split-MMDDYYYY Resolve conflicts and commit (acme/cime changes into branch off of esmci/cime tag) Most conflicts can be settled by taking ACME version, since we backed up CIME to the tag. Git checkout --theirs <file> will take ACME version $ <Numerous conflict edits, followed by "git add <file>" for each <file> with conflict> $ git commit . $ git push esmcicime agsalin/cime52-with-acmesplit-MMDDYYYY Now, you have a branch of cime, off of the tag, with ACME changes added in Create a branch off of CIME master, and merge the acme changes into it $ git checkout esmcicime/master $ git checkout -b agsalin/merge-from-acme-03292017 $ git merge agsalin/cime52-with-acmesplit-03292017 Resolve conflicts and commit (acme/cime changes added to CIME tag, merged into cime master) $ <Numerous conflict edits, followed by "git add <file>" for each <file> with conflict> $ ./scripts/tests/scripts_regression_tests.py $ git push esmcicime agsalin/merge-from-acme-03292017 Issue PR Delete old tag: $ git tag -d acme-split-mm-dd-yyyy $ git push origin :refs/tags/acme-split-mm-dd-yyyy |
...