From b900c104b9a8db6de9c833ba1fece94802eb4cef Mon Sep 17 00:00:00 2001 From: Greg DeKoenigsberg Date: Wed, 20 Jan 2016 10:25:49 -0500 Subject: [PATCH 1/3] Adding submodule help --- docsite/rst/developing_test_pr.rst | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/docsite/rst/developing_test_pr.rst b/docsite/rst/developing_test_pr.rst index b6ec4e10ba5..af7c4bbb13f 100644 --- a/docsite/rst/developing_test_pr.rst +++ b/docsite/rst/developing_test_pr.rst @@ -81,27 +81,35 @@ and destination repositories. It will look something like this:: Someuser wants to merge 1 commit into ansible:devel from someuser:feature_branch_name .. note:: - It is important that the PR request target be ansible:devel, as we do not accept pull requests into any other branch. - Dot releases are cherry-picked manually by ansible staff. + It is important that the PR request target be ansible:devel, as we do not accept pull requests into any other branch. Dot releases are cherry-picked manually by ansible staff. The username and branch at the end are the important parts, which will be turned into git commands as follows:: git checkout -b testing_PRXXXX devel git pull https://github.com/someuser/ansible.git feature_branch_name -The first command creates and switches to a new branch named testing_PRXXXX, where the XXXX is the actual issue number associated -with the pull request (for example, 1234). This branch is based on the devel branch. The second command pulls the new code from the -users feature branch into the newly created branch. +The first command creates and switches to a new branch named testing_PRXXXX, where the XXXX is the actual issue number associated with the pull request (for example, 1234). This branch is based on the devel branch. The second command pulls the new code from the users feature branch into the newly created branch. .. note:: - If the GitHub user interface shows that the pull request will not merge cleanly, we do not recommend proceeding if you - are not somewhat familiar with git and coding, as you will have to resolve a merge conflict. This is the responsibility of - the original pull request contributor. + If the GitHub user interface shows that the pull request will not merge cleanly, we do not recommend proceeding if you are not somewhat familiar with git and coding, as you will have to resolve a merge conflict. This is the responsibility of the original pull request contributor. .. note:: - Some users do not create feature branches, which can cause problems when they have multiple, un-related commits in - their version of `devel`. If the source looks like `someuser:devel`, make sure there is only one commit listed on - the pull request. + Some users do not create feature branches, which can cause problems when they have multiple, un-related commits in their version of `devel`. If the source looks like `someuser:devel`, make sure there is only one commit listed on the pull request. + +Finding a Pull Request for Ansible Modules +++++++++++++++++++++++++++++++++++++++++++ +Ansible modules are in separate repositories, which are managed as Git submodules. Here's a step by step process for checking out a PR for an Ansible extras module, for instance: + +1. git clone https://github.com/ansible/ansible.git +2. cd ansible +3. git submodule init +4. git submodule update --recursive +5. cd lib/ansible/modules/extras +6. git fetch origin pull/1234/head:pr/1234 +7. git checkout pr/1234 +[ DO YOUR TESTING HERE ] +8. cd /path/to/ansible/clone +9. git submodule update --recursive For Those About To Test, We Salute You ++++++++++++++++++++++++++++++++++++++ From a4f91c2c53bc92acf391e0296cab33488865daef Mon Sep 17 00:00:00 2001 From: Greg DeKoenigsberg Date: Wed, 20 Jan 2016 10:27:37 -0500 Subject: [PATCH 2/3] format fix for github markup --- docsite/rst/developing_test_pr.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docsite/rst/developing_test_pr.rst b/docsite/rst/developing_test_pr.rst index af7c4bbb13f..1a5593ae446 100644 --- a/docsite/rst/developing_test_pr.rst +++ b/docsite/rst/developing_test_pr.rst @@ -107,9 +107,9 @@ Ansible modules are in separate repositories, which are managed as Git submodule 5. cd lib/ansible/modules/extras 6. git fetch origin pull/1234/head:pr/1234 7. git checkout pr/1234 -[ DO YOUR TESTING HERE ] -8. cd /path/to/ansible/clone -9. git submodule update --recursive +8. [ Do your tests here ] +9. cd /path/to/ansible/clone +10. git submodule update --recursive For Those About To Test, We Salute You ++++++++++++++++++++++++++++++++++++++ From a10e15c765c38896183f20d8b93f505afb702bf4 Mon Sep 17 00:00:00 2001 From: Greg DeKoenigsberg Date: Wed, 20 Jan 2016 10:29:25 -0500 Subject: [PATCH 3/3] Update developing_test_pr.rst --- docsite/rst/developing_test_pr.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docsite/rst/developing_test_pr.rst b/docsite/rst/developing_test_pr.rst index 1a5593ae446..cf3d0d7536f 100644 --- a/docsite/rst/developing_test_pr.rst +++ b/docsite/rst/developing_test_pr.rst @@ -103,13 +103,12 @@ Ansible modules are in separate repositories, which are managed as Git submodule 1. git clone https://github.com/ansible/ansible.git 2. cd ansible 3. git submodule init -4. git submodule update --recursive +4. git submodule update --recursive [ fetches the submodules ] 5. cd lib/ansible/modules/extras -6. git fetch origin pull/1234/head:pr/1234 -7. git checkout pr/1234 -8. [ Do your tests here ] -9. cd /path/to/ansible/clone -10. git submodule update --recursive +6. git fetch origin pull/1234/head:pr/1234 [ fetches the specific PR ] +7. git checkout pr/1234 [ do your testing here ] +8. cd /path/to/ansible/clone +9. git submodule update --recursive For Those About To Test, We Salute You ++++++++++++++++++++++++++++++++++++++