Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is for integrators who will be bringing in code or changes to code from an external repository. This page describes the process where the code will be integrated into the ACME repository as a git subtree. There are four three possible workflows; Inserting in a new external to ACME as a subtree, replacing original ACME code with an external, replacing modified ACME code with an external, and merging in changes to an external subtree. Each workflow is outlined below followed by sections showing details for various workflow step types.

Some Terminology

<external-subdir> refers to the place in the ACME tree where the external code resides (or will reside).

<external_name> is a name you give to the external so that you can refer to the external repository.

<external_url> is the URL for the external repository.

<external_commit> refers to a branch name (<external_url>/<branch_name>), a commit, or a tag name from the external repository.

...

Insert new external subtree into ACME

  1. Create and switch to a branch in which to conduct the work. Be sure to follow the branch naming conventions and other development practices. If the external code is to be completely replaced, create the branch from the commit where the code was last brought into the ACME repository (similar for the procedure for fixing a bug). The branch name should follow the form github-username/component/component.<version>_import.
  2. Add code from external git repo to ACME (git read-tree --prefix=<external_subdir>/ -u <external_name>commit>).
  3. Commit the change (git commit).
  4. Test and submit a pull request as defined in the development practices page.

...

Replace original (unmodified) ACME code with external subtree

  1.  Verify that the external code in the ACME repository has been not been modified since the initial commit (cd <external-subdir>; git diff --name-only v0.0 .). If there are changes (non-blank output), follow the 'Replace modifiedMerge changes from external into ACME subtree' workflow below.
  2. Create and switch to a branch in which to conduct the work. Be sure to follow the branch naming conventions and other development practices. If the external code is to be completely replaced, create the branch from the commit where the code was last brought into the ACME repository (similar for the procedure for fixing a bug). The branch name should follow the form github-username/component/component.<version>_import.
  3. Add external git repo to as a remote in your local repository copy (git remote add -f --tags <external_name> <external_url>).

  4. Remove the code from your working copy (git rm -r <external-subdir>).
  5. Add code from external git repo to ACME (git read-tree --prefix=<external_subdir>/ -u <external_name>commit>).
  6. Commit the change (git commit).
  7. Test and submit a pull request as defined in the development practices page.

...

  1. Create and switch to a branch in which to conduct the work. Be sure to follow the branch naming conventions and other development practices. If the external code is to be completely replaced, create the branch from the commit where the code was last brought into the ACME repository (similar for the procedure for fixing a bug). The branch name should follow the form github-username/component/component.<version>_import.
  2. If the external code is new (no version is currently in ACME repository), skip to step 5.
  3. If the external code is to be completely replaced, remove the code from your working copy. Then, skip to step 5.
  4.  Check to see if the version of the code in the ACME repository has been modified since the initial commit. If there are no changes (blank output), skip to step 6. <always go to step 6?>
  5. Add external git repo to ACME. Now, skip to step 7.
  6. To bring in changes to external repo <fill this in with git subtree merge (and git remote add --tags?)>.
  7. Test and submit a pull request as defined in the development practices page.

...

Merge changes from external into ACME subtree

  1. Create and switch to a branch in which to conduct the work. Be sure to follow the branch naming conventions and other development practices. If the external code is to be completely replaced, create the branch from the commit where the code was last brought into the ACME repository (similar for the procedure for fixing a bug). The branch name should follow the form github-username/component/component.<version>_import.
  2. If the external code is new (no version is currently in ACME repository), skip to step 5.
  3. If the external code is to be completely replaced, remove the code from your working copy. Then, skip to step 5.
  4.  Check to see if the version of the code in the ACME repository has been modified since the initial commit. If there are no changes (blank output), skip to step 6. <always go to step 6?>
  5. Add external git repo to ACME. Now, skip to step 7.
  6. To bring in changes to external repo <fill this in with git subtree merge (and git remote add --tags?)>.
  7. Test and submit a pull request as defined in the development practices page.

 

 

...

    cd <external-subdir>/..
    git rm -r <external-subdir>

...

    cd <external-subdir>
    git diff --name-only v0.0 .

...

  1. Add external git repo to as a remote in your local repository copy

...

  1. (git

...

  1. remote

...

  1. add

...

  1. -f

...

  1. --tags

...

  1. <external_name>

...

  1. <external_url>

...

  1. ).
  2. Merge  from external git repo to ACME

...

    cd <ACME_top_level>

...

  1. (git merge --squash -X subtree=<external_subdir>

...

  1. --no-

...

  1. commit <external_

...

    git merge -X subtree=the-dir/ $commit

...

  1. commit>).
  2. Commit the change (git commit).
  3. Test and submit a pull request as defined in the development practices page.

Note that <external_name> can be a branch name, a commit, or a tag name.

...

Related articles

Filter by label (Content by label)
showLabelsfalse
max5
spacesSE
showSpacefalse
sortmodified
reversetrue
typepage
labelsRepository

...