From 1a81cda8b7eba0d25ea7341da756bb588cae8d73 Mon Sep 17 00:00:00 2001 From: Hamdi Roumani Date: Mon, 3 Aug 2015 17:45:56 -0400 Subject: [PATCH] Doc instructions for post rebase steps Improve the 'first_contribution_swift' by adding instructions for how to rebuild swift following a rebase. Change-Id: If5c91dc4e1e8d1712bbd8b326c675967fb4b8c15 --- doc/source/first_contribution_swift.rst | 37 +++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/doc/source/first_contribution_swift.rst b/doc/source/first_contribution_swift.rst index bbd3c65ff8..b4aa948ed7 100644 --- a/doc/source/first_contribution_swift.rst +++ b/doc/source/first_contribution_swift.rst @@ -118,6 +118,36 @@ After you proposed your changes to Swift, you can track the review in: * ``_ +.. _post-rebase-instructions: + +------------------------ +Post rebase instructions +------------------------ + +After rebasing, the following steps should be performed to rebuild the swift +installation. Note that these commands should be performed from the root of the +swift repo directory (e.g. $HOME/swift/): + + ``sudo python setup.py develop`` + + ``sudo pip install -r test-requirements.txt`` + +If using TOX, depending on the changes made during the rebase, you may need to +rebuild the TOX environment (generally this will be the case if +test-requirements.txt was updated such that a new version of a package is +required), this can be accomplished using the '-r' argument to the TOX cli: + + ``tox -r`` + +You can include any of the other TOX arguments as well, for example, to run the +pep8 suite and rebuild the TOX environment the following can be used: + + ``tox -r -e pep8`` + +The rebuild option only needs to be specified once for a particular build (e.g. +pep8), that is further invocations of the same build will not require this +until the next rebase. + --------------- Troubleshooting --------------- @@ -145,8 +175,5 @@ your commit using: This happens because `git rebase` will retrieve code for a different version of Swift in the development stream, but the start scripts under `/usr/local/bin` have -not been updated. The solution is to execute the following command under the swift -directory (which contains `setup.py`): - - ``sudo python setup.py develop`` - +not been updated. The solution is to follow the steps described in the +:ref:`post-rebase-instructions` section.