[84] | 1 | $Id: README.developer 850 2009-11-17 04:59:34Z peter $ |
---|
[26] | 2 | |
---|
[338] | 3 | = Developer Information = |
---|
| 4 | |
---|
| 5 | This file contains developer specific information. |
---|
| 6 | |
---|
[394] | 7 | |
---|
| 8 | === Coding style === |
---|
| 9 | |
---|
| 10 | Developers should follow the coding style outlined in the |
---|
[560] | 11 | [http://cbbp.thep.lu.se/~jari/documents/c++_coding_guidelines/index.html C++ coding guidelines]. |
---|
[394] | 12 | |
---|
| 13 | |
---|
| 14 | === Subversion usage === |
---|
| 15 | |
---|
| 16 | Commits should be minimalistic and the projects should always compile |
---|
[442] | 17 | (`make` and `make check`) when someone makes a clean checkout. There is |
---|
[394] | 18 | a short introduction to subversion and its usage available as |
---|
[560] | 19 | [http://cbbp.thep.lu.se/~jari/documents/subversion_guidelines/index.html Subversion guidelines]. |
---|
[394] | 20 | We follow these guidelines. |
---|
| 21 | |
---|
| 22 | |
---|
[724] | 23 | === Requirements === |
---|
| 24 | |
---|
| 25 | To build from a subversion checkout, you will need Autotools. More |
---|
[776] | 26 | specifically Automake 1.10 (or later) and Autoconf 2.61 (or later). To |
---|
[724] | 27 | build man page you will need help2man. |
---|
| 28 | |
---|
[481] | 29 | === bootstrap and autoreconf === |
---|
[387] | 30 | |
---|
[481] | 31 | At first checkout from the repository you must run the bootstrapping |
---|
| 32 | utility |
---|
[338] | 33 | |
---|
| 34 | `./bootstrap` |
---|
| 35 | |
---|
[481] | 36 | to setup autoconf files. To push subsequent changes of this file into |
---|
| 37 | the build scripts you run |
---|
[338] | 38 | |
---|
[481] | 39 | `autoreconf` |
---|
[394] | 40 | |
---|
[481] | 41 | |
---|
[338] | 42 | === configure === |
---|
| 43 | |
---|
[387] | 44 | Run the generated configure script with |
---|
| 45 | |
---|
[555] | 46 | `./configure --enable-debug` |
---|
[338] | 47 | |
---|
| 48 | The option flag `--enable-debug` turns on debug options (e.g. enables |
---|
[547] | 49 | assertions). |
---|
[338] | 50 | |
---|
[394] | 51 | |
---|
| 52 | === Testing === |
---|
| 53 | |
---|
| 54 | Test programs should be created and added to the `make check` |
---|
| 55 | execution. Always check that the test runs before committing code to |
---|
| 56 | the repository, i.e., run `make check`. |
---|
| 57 | |
---|
| 58 | There is a test repository in source:trunk/test/repo that is a part of |
---|
| 59 | the svndigest repository. The logic behind this is that it is nice to |
---|
| 60 | have a common test repository that can be used off-line. Changes to |
---|
| 61 | the repository are usually made to create new test cases and it is |
---|
| 62 | important that these changes are committed to svndigest repository as |
---|
| 63 | well. All changes to the test repository are not automatically |
---|
| 64 | propagated to the svndigest repository and it is important that some |
---|
| 65 | files created in the test repository are manually added to the |
---|
| 66 | svndigest repository. Assuming that `make check` is run before a |
---|
| 67 | commit, a warning is generated if the test repository is inconsistent |
---|
| 68 | with the svndigest repository. There will be a diagnostic message and |
---|
| 69 | a resolution hint, however the developer must examine and resolve the |
---|
| 70 | problem manually. |
---|
| 71 | |
---|
| 72 | The problem is simply that the file source:trunk/test/repo/db/current |
---|
| 73 | is changed compared to the svndigest repository. The `current` file |
---|
| 74 | indicates a specific number of change sets within the test repository |
---|
| 75 | and the directories source:trunk/test/repo/db/revs and |
---|
| 76 | source:trunk/test/repo/db/revprops contains a matching number of |
---|
| 77 | change sets. However, the change sets added to the test repository are |
---|
| 78 | not automatically added to the svndigest repository, therefore the new |
---|
| 79 | files in the `revs` and `revprops` directories must be added manually |
---|
| 80 | to the svndigest repository. |
---|
| 81 | |
---|
| 82 | There is also a race condition when developers make changes to the |
---|
| 83 | test repository simultaneously: It is easy to create severe conflicts |
---|
[583] | 84 | in the test repository. Imaging the case when two developers add test |
---|
[394] | 85 | commits to the test repository, and then tries to add these to the |
---|
| 86 | svndigest repository. Since there are different versions of the same |
---|
| 87 | test repository revisions, the second developer committing to the |
---|
| 88 | svndigest will get messages about files being in the way. This is just |
---|
| 89 | one situation with possible conflicts. This conflict is of course |
---|
| 90 | resolved by the second developer having to throw away his changes and |
---|
| 91 | redo them after a new checkout of the test repository. |
---|
| 92 | |
---|
| 93 | The take home message is that developers should communicate with each |
---|
| 94 | other when changing the test repository in order to avoid to large |
---|
| 95 | repository conflicts. AND read the output of `make check`. |
---|
| 96 | |
---|
| 97 | |
---|
[825] | 98 | === yat library === |
---|
| 99 | |
---|
| 100 | Directory `lib/yat/` contains some files from the yat library. These |
---|
| 101 | files are not owned by svndigest and should not (if possible) be |
---|
| 102 | edited here. For more details please see `lib/yat/README`. |
---|
| 103 | |
---|
[494] | 104 | === Output file structure === |
---|
| 105 | |
---|
| 106 | A directory reflecting the parsed directory is generated for each |
---|
| 107 | combination of StatsType, Author, and LineType, which is located in |
---|
[496] | 108 | `<TARGET>/<ROOT>/StatsType/Author/LineType/`. Author may be, on top of |
---|
| 109 | each author in the repository, a directory ''all'' that is a sum over |
---|
| 110 | all Authors. In same fashion LineType may be any of the three |
---|
| 111 | linetypes but may also ''total'', which a sum over all linetypes. In |
---|
| 112 | each `<TARGET>/<ROOT>/StatsType` there are directories |
---|
| 113 | `images/LineType` that contain a structure reflecting the parsed |
---|
| 114 | directory with images for every combination of File, LineType, and |
---|
| 115 | StatsType. Images for different Authors are identical and therefore |
---|
| 116 | shared between authors. |
---|
[494] | 117 | |
---|
[850] | 118 | == Design and Motivation == |
---|
[494] | 119 | |
---|
[850] | 120 | Please refer to source:trunk/doc/HACKING for a list of design |
---|
| 121 | decisions we try to follow. |
---|
| 122 | |
---|
[394] | 123 | == Releasing == |
---|
[338] | 124 | |
---|
[687] | 125 | See http://dev.thep.lu.se/svndigest/wiki/ReleaseProcedure |
---|
[394] | 126 | |
---|
| 127 | |
---|
[338] | 128 | ------------------------------------------------------------------------- |
---|
| 129 | {{{ |
---|
[408] | 130 | Copyright (C) 2005, 2006 Jari Häkkinen |
---|
[847] | 131 | Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson |
---|
| 132 | Copyright (C) 2009 Peter Johansson |
---|
[84] | 133 | |
---|
[687] | 134 | This file is part of svndigest, http://dev.thep.lu.se/svndigest |
---|
[84] | 135 | |
---|
[149] | 136 | svndigest is free software; you can redistribute it and/or modify it |
---|
[84] | 137 | under the terms of the GNU General Public License as published by the |
---|
[693] | 138 | Free Software Foundation; either version 3 of the License, or (at your |
---|
[84] | 139 | option) any later version. |
---|
| 140 | |
---|
[149] | 141 | svndigest is distributed in the hope that it will be useful, but |
---|
| 142 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 143 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 144 | General Public License for more details. |
---|
[84] | 145 | |
---|
| 146 | You should have received a copy of the GNU General Public License |
---|
[693] | 147 | along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
---|
[338] | 148 | }}} |
---|