If you want to commit new code to MercuryDPM, follow these steps.
- Update your git repository to the latest version of Mercury. This ensures that you have no conflicts with the changes other people have made since you last checked out.
$ cd MercurySource
$ git pull
Updating '.':
U Drivers/MercurySimpleDemos/CMakeLists.txt
A Documentation/Pages/DoxygenDocumentationForDummies.dox
Updated to revision 1556.
If you do get conflicted files, read the git manual to find out how to resolve these conflicts. Some helpfull commands are: git log –merge, git diff, git checkout, git reset –mixed, git merge –abort, git reset. But check the internet or ask an developer if you are not sure.
- Check your changes; you can use git status to see which files have changed,
$ git status
M Documentation/Pages/DevelopersGuide.dox
Use git diff to see which changes you have made to each file and review them. A full list of git commands can be found using git help. $ git diff head Documentation/Pages/DevelopersGuide.dox
diff --git a/Documentation/Pages/DevelopersGuide.dox b/Documentation/Pages/DevelopersGuide.dox
index 1ec3f2b5..9ab4c207 100644
--- a/Documentation/Pages/DevelopersGuide.dox
+++ b/Documentation/Pages/DevelopersGuide.dox
@@ -156,7 +156,7 @@ Other boundaries are possible; see the documentation of BoundaryHandler for more
- Test have to be run before any new feature is committed, and return a positive result. Any commit that breaks one or more tests is a violation of the MercuryDPM coding standard, and is punishable by a round of beers to all other developers. To execute all test, run the following command before committing:
$ cd MercuryBuild
$ make fullTest
- Write a message detailing your changes, and submit:
$ more file
Feature finished: Mercury Logger
-I have adapted the logger such that it works now fully as it should
-Asserts will be handled by the logger using logger.assert_debug(..) and logger.assert_always(..)
-Only ExtendedMath MatrixSymmetric and NumericalVector contained asserts, they have been rewritten to the logger.assert
$ git commit -F file
Alternatively, use a simple message string, $ git commit -m 'MDPM-116 #resolve #comment Updating instructions on how to submit to MercuryDPM to the Code Developer Guidelines'
- Jira markups: If the change concerns a specific jira job, mention the job number in the message; you can also pass commands like #resolve to jira, so the job is automatically closed. Examples:
$ git commit -m 'MDPM-116 #resolve #comment Updating instructions on how to submit to MercuryDPM to the Code Developer Guidelines'
$ git commit -m 'Updating instructions on how to submit to MercuryDPM to the Code Developer Guidelines #MDPM-43'