Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added 2-step merge process for moving ACME/cime changes upstream to ESMCI/CIME. Will need to merge with above documentation when we settle on a robust workflow.

...

You can now push the branch containing the code for the external and merge it to master using the external's procedures.


...

Two-step workflow option (under development as of March 2017)

Here are the commands for a 2-step process that Andy used successfully, March 2017. Need to integrate with above description once we settle on a process.

Previously, ESMCI/CIME was tagged with "cime5.2.0", and that code was brought into ACME. The process below (recommended by Rob) is a 2-step process. First the changes in ACME are merged into a branch coming off of that tag. A second step merges those changes into master. One nice part of this process is that the first step has mostly ACME changes, so conflicts are can mostly be reconciled by taking ACME version. The second step has just true conflicts, which will not be very many.

NOTE: need to pick better branch naming conventions in the future.

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

Create cime subtree of ACME. You will still be in a directory
called ACME, but it will now have the cime dir contents
$ git subtree split --prefix cime/ --ignore-joins -b agsalin/acme-to-cime-03162017

Add ESMCI/CIME as an additional remote.
$ git remote add esmcicime git@github.com:ACME-Climate/cime.git
$ git fetch esmcicime

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 tags/cime5.2.0
$ git checkout -b agsalin/cime52-with-acme52-merge
$ git merge -X rename-threshold=25  agsalin/acme-to-cime-03162017

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.
$ <Numerous conflict edits, followed by "git add <file>" for each <file> with conflict>
$ git commit .
$ git push esmcicime agsalin/cime52-with-acme52-merge
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-03162017
$ git merge  agsalin/cime52-with-acme52-merge

 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-03162017