[Teammetrics-discuss] Changes to GitStat.
Sukhbir Singh
sukhbir.in at gmail.com
Sun Aug 21 13:30:23 UTC 2011
Hi,
> Are you sure you commited the change? I just cleaned up my local database
> completely and was running commitstat.py:
Yes, I did commit the changes and I just checked again to be extra
sure (read on).
> DETAIL: Schlüssel »(commit_id, project)=(761c0772e695db1199e5116d6ba06535cab0c993, debian-med)« existiert bereits.
I see now why you get the error and I don't. During testing, I had
changed the primary keys to:
Column | Type | Modifiers
----------------+---------+-----------
commit_id | text | not null
project | text |
package | text | not null
... because within a project, there were more than one instances of
the same key.
SELECT commit_id, name, project, package FROM commitstat WHERE
project='debian-med' AND commit_id like '761c077%';
commit_id | name | project
| package
------------------------------------------+---------------+------------+-------------------
761c0772e695db1199e5116d6ba06535cab0c993 | Shaun Jackman | debian-med | igv
761c0772e695db1199e5116d6ba06535cab0c993 | Shaun Jackman | debian-med
| igv-manuel
761c0772e695db1199e5116d6ba06535cab0c993 | Shaun Jackman | debian-med
| igv-to_be_removed
So why are there more than one packages with the same hash? :) I don't know.
So two things can be done:
1. Either we set the primary key on the package column (like I have done).
2. We set it on the project column only (blends.d.n and our
repository) and discard multiple commits of the same hash.
I did not go for (2) by myself because of multiple packages having the
same hash.
More information about the Teammetrics-discuss
mailing list