Added an option to limit the amount of commits checked
[git-stats.git] / doc / changelog.txt
blob67e3c33a3fb70dc1100754c042224d728e026fe7
1 Preliminary version of the activityInArea function is done,
2 can't handle merges yet. The test repo perhaps needs some
3 TLC to produce merges, have mutliple authors, and mutliple
4 files. Merges may be handled by splitting the line and
5 checking if it has more than 1 part.
7 Finished activityInArea for now, it handles merges as
8 suggested, but the test repo still needs said TLC. Wrote a
9 wrapper script, stats.py, that will serve as a command
10 dispatcher / readability layer. Unhandled at the moment are
11 directory/file renames.
13 No work done because of uni project deadline, project is
14 finished now so more time for gsoc now.
16 Created a 'touched' command that shows all commits that
17 touch the same files as the staged changes. Also created
18 another function that lists all files touched in a commit.
19 That way instead of allowing it to only work on staged
20 changes it may also work upon a specific commit.
22 Created three functions, branchContains, commitmsgMatches,
23 and commitdiffMatches, to use for metrics later on. The
24 test repo needs major TLC now, it is rather useless for
25 testing the above functions. There is no validty checking
26 yet for any of the current functions, perhaps do this at
27 dispatch time? The function that dispatches should be able
28 to do git-rev-check on the arguments if required.
30 No development done in the morning during due to a
31 presentation for uni. Couldn't start coding till later in
32 the day due to going out with the family because the house
33 is sold. Gave the test repo the TLC it deserves.
35 Started work on a diff-parser. Turns out this will need
36 some further thought (what about renames etc), but not now.
38 Completed the diff parser and added a diff-differ. There
39 are currently no tests for either, but manual testing has
40 been done. Next step should probably be the creation of
41 testcases and perhaps expanding the test repo.
43 Done only trival work, spent most day studying for
44 upcomming examns. Tried to decide on how to test things but
45 came up short.
47 Decided on using a modified version of test-lib.sh for
48 testing. Next problem that came up is how to test functions
49 from the modules. Most obvious solution is to implement
50 command parsing in stats.py. Another problem is how to get
51 access to stats.py in the test repo.  Optparse looks nice
52 for parsing but might be overkill. Main problem now is what
53 commandline structure to use for dispatching.
55 Got started on the dispatcher, the 'diff' part actually has
56 a working dispatcher. All other modules have a no-op method
57 that excepts any amount of arguments though. Noticed a bug
58 in commitDiffEquals which will need fixing; it currently is
59 unable to handle hunks longer than one line, very lame.
60 This once more points out the need of good test-cases.
61 Dispatching has to be finished first though, which will
62 probably be done tomorrow.
64 Worked mostly on getting dispatching working. There is now
65 a basic dispatcher that dispatches to the different
66 modules. In the modules dispatching is handled by means of
67 an OptParser. So far only diff and commit have such a
68 dispatcher implemented, although the one for diff is hardly
69 finished.
71 Incorperated some spelling fixes by David. Worked on
72 getting the testcases script resubmitted, for inclusion
73 this time. Spent a few hours trying to figure out why an
74 import wouldn't work, very gratifying work... Turned out to
75 be a cyclic 'from .. import ..', which python doesn't like.
76 Got annoyed by such a waste of time and spent the rest of
77 the day studying for school.
79 Finished the dispatching framework (one day late). Adjusted
80 the planning accordingly, so that testcases start tomorrow.
81 The the remainder of the week should be enough to finish
82 the testscases though. Meanwhile noticed that git has some
83 things already built in, but not in plumbing! (Such as
84 'git branch --contains'.) Will probably just use the
85 porcelain in those cases, perhaps ask at the GML.
87 Made use of 'stats.py' for the first time in a real life
88 use-case. Instead of using 'git blame' to find out when the
89 bug in author.py was introduced, made use of 
90 'stats.py index' to find out which one it was. Had to
91 modify commit.prettyPrint to show "-p" instead of
92 "--name-only", which should probably become a configuration
93 option at some point.
95 Finished the branch testcases, noticed another bug, this
96 time in branch.py. (It wasn't really a bug, the resulting
97 branches of 'stats.py branch' were ran through prettyPrint
98 before being displayed. As a result the HEAD commits were
99 shown instead of the names of the branches.
101 Worked on a a way to get return values for function calls.
102 Later found out that the latest git-python has such a
103 feature, so that work was double. Instead spent time on
104 getting git-python working 'out of the box' which involved
105 upgrading to the latest version, in which all trailing
106 whitespace (including newlines) is removed by default.
108 Added testcases for commit.py, which pointed out a major
109 bugs in the --diff-contains filter (noticed it before, but
110 had not taken the time to investigate). Fixing the bug took
111 quite some time, mainly because git-python first had to be
112 extended to support GIT_PYTHON_TRACE=full, which prints the
113 result of all git calls. With that working, it was a lot
114 easier to see what was going on.
116 Spent most of the day trying to get internet at the new
117 house. Heard the words "sorry, you will have to call the
118 other company, we can't do this" at least a dozen times.
119 Hopefully tomorrow will be more productive, today felt
120 like a day wasted.
122 Got a lot of work done today, all the subcommands now have
123 testcases, although some are along the lines of 
124 'There is no test for ...'. Mostly because the setupRepo
125 script does not offer the repo that is required to test
126 that specific functionality. Spent some time toying around
127 with GitPython, it now has a with_keep_cwd method that will
128 be usefull for 'commit -r -t'.
130 Noticed today that http://repo.or.cz is down, as such it is
131 currently not possible to push out the latest changes. Per
132 request test-lib.sh no longer requires a git build to be
133 present, instead it will use the regular git install. 
134 Together with this change, some functionality was removed
135 because it was not used anyway. Have been busy most the day
136 studying for upcomming examns (the first one is monday).
138 Spore Creature Creator (demo) was leaked a few days early,
139 spent quite a bit of time playing around with it. Went on
140 to try and understand computability theory before tomorrows
141 test. Fixed the bug in "commit -t" where it did not check
142 if the specified filename is sane.
144 Also created the missing testcase for 'diff -n', which was
145 quite trivial with the latest changes to the test repo.
146 Added the missing test for 'index -a', which involved
147 expanding the test repo to include a case in which the
148 switch is usefull. Central today though was the examn, most
149 of the day revolved around it.
151 Fixed the last "no testcase for" test, namely "branch -r".
152 To do so had to add a remote branch in the setupRepo script
153 with the "git-update-ref" command. Then, while sending a
154 mail to the list regarding "branch --contains" being a
155 porcelain command, but with no plumbing equivalent
156 available, gmail locked down. Not sure why, something about
157 a possible violation of the Terms of Service.
159 Got started on the 'belongs to' metric today. It was very
160 nice, got it right on the first try, the algorithm found
161 the branch that the test commit belonged to perfectly, and
162 also marked the diluted branches as desired. It was easy
163 after that to fetch the best matches. Left to do is to
164 check the commit message of the merge and see if the
165 default commit message concurs with what was found to be
166 the primary parent.
168 The math examn is closing in fast, wrestled through 5
169 chapters today, so only a few hours left for coding. 
170 Hopefully it will be done soon, and the 12h / day hacking
171 fest will begin! Added a bumpTime that makes the graph
172 made by gitk --all better readable.
174 After some silence due to studying, development is picking
175 up again! Got a lot done today, some of which related to
176 the latest changes in GitPython. The test suite passes
177 again now using the latest HEAD of GitPython. Also made
178 the generated repo's not have all the commits at the same
179 moment, instead the commit time is bumped with each
180 'action'.
182 One and a half day 'lost' to moving, not something to do on
183 a regular basis. Perhaps if it was as simple as 'git mv'?
184 Dug into a bug into the branch contains metric now that
185 there is a proper repo to try it out on. Turned out that
186 to view the metrics repostitory the git-forest script is
187 _very_ useful. It seems to be the only visualizer that is
188 capable of giving a sensible visual representation.
189 Discovered a corner case that needs to be figured out, in
190 an attempt to do so factored out the function that
191 calculates the metric. Too tired now to figure it out,
192 tomorrow should be good.
194 Today was good indeed! The problem was that 'git rev-list'
195 will follow merges (which is good), but that was not taken
196 in account by the metric (which is bad). There was no easy
197 way to get it to take that into account (which is bad too),
198 as a result the entire metric was made to be recursive. As
199 a result of that rewrite the algorithm took very long to
200 run, which lead to the first optimization so far. The tests
201 for this metric run thrice as fast after with the
202 optimization in place, a good day indeed!
204 All day birthday party, grandmother turned 75
205 (congratulations!), couldn't start coding till late in the
206 evening. Did manage to finish the 'activity in file'
207 algorithm. Easy to do, but useful in deciding who has been 
208 working on a certain file.
210 Worked on the bug.py file which has not been committed yet,
211 but contains commands related to determining whether a
212 certain commit was a fix or not. Tried to use git-forest to
213 pick a commit from git.git from the maint branch, but ran
214 into trouble with piping to less. Turned out it was a
215 simple fix, the -R switch was missing. Exporting LESS=FRSX
216 fixed the problem, although it took quite a bit to figure
217 that out. When trying stats.py branch -b on the git.git
218 repo python raised an exception because the recursion
219 limit was breached. Best fix would be to not use recursion
220 but go with a stack-based approach instead. Spent a large
221 part of the day studying for the last test tomorrow.
223 Went in for the kill and aced today's test, socialized for
224 the remainder of the day. Busy day tomorrow, hopefully
225 there will be time for coding tomorrow evening. The 
226 mid-term evaluation is comming up, it would be nice to have
227 something to show the mailing list by then.
229 Working in the night-train since there is a power plug in
230 the cabin. Managed to rewrite the 'belongs to' algorithm
231 so that python's recursion limit is not a problem on large
232 repositories.
234 Worked a lot on optimizing the 'belongs to' algorithm on
235 the git.git repository. Now it is usable on large
236 repositories and can be incorperated in the bug detection
237 system. Next step now is making the bug detection metrics
238 configurable through a file or such.
240 Added aggregation to the 'activity' metric, which is now
241 capable of showing the activity of all files aggregated
242 over all developers, or showing the activity for all
243 developers. 
245 Made a simple config parser that is capable of parsing
246 config files that follow the '.git/config' style. It
247 searches for a '[GitStats]' verse from which it takes all
248 values and returns them as a dictionary. Used this to feed
249 the 'bug -t' metric, which is very much usable now. Left to
250 do now is to aggregate 'bug -t' over all commits.
252 Many work done on optimizing 'bug -a' which now runs in
253 under 4 seconds on git-stats.git instead of taking about
254 1.5 minutes!! It is still not usable on the git.git repo
255 on which it takes >10 minutes to complete. Will probably
256 have to cache data in order to get something useful for
257 such big repo's. Either that, or not run on all commits but
258 instead only on the most recent n commits or such.
259 Started to work on a diff matcher per suggestion of
260 Johannes Schindelin aka Dscho. Would be nice if it works
261 out and is incorperated into git-log (which would make it
262 a lot faster, and very useful to others as well).