Gentoo Archives: gentoo-dev

From: Nirbheek Chauhan <nirbheek@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] [git migration] The problem of ChangeLog generation
Date: Tue, 06 Apr 2010 02:13:32
Message-Id: y2h8b4c83ad1004051913je48d03eat3af5f26b7500428f@mail.gmail.com
1 One of the few remaining problems to be solved for the migration to
2 git for our gentoo-x86/ and gentoo/ trees (besides other
3 projects/overlays) is the problem of how to handle ChangeLogs.
4
5 ====
6 Gist:
7 ====
8 * It makes zero sense to manually manage ChangeLogs in git[1]
9 - Irritating conflicts while merging branches or remote master
10 + Similar argument for having only distfile manifests; but I digress...
11 - Duplication of effort and information
12 - Saves space for local checkouts
13 * Proposed is to generate ChangeLogs from git commits on the rsync
14 server side when metadata generation is done
15 - Scripts to do this already exist[1]
16
17
18 Now, there are obviously problems with this. Some of them are
19 documented below alongwith their proposed solutions. If people foresee
20 other problems with this; they are requested to comment. They are also
21 welcome to comment if they have a better solution to the problems
22 listed below.
23
24 Also, please try to keep this thread on-topic.
25
26
27 ========
28 Problems:
29 ========
30 * Messages in ChangeLog are not always the same as the commit messages
31 (~1% are different)
32 * Some people place additional information in the commit message which
33 is intended only for developer use
34 - Most of the difference in ChangeLog/commit messages comes from this
35 * Trivial changes are often not documented in ChangeLogs
36 - This is upto the developer's personal preference
37 - Some folks do this because of the extra time it takes
38 + This use-case becomes irrelevant due to automatic generation of ChangeLog
39
40 ========
41 Solutions:
42 ========
43 * Do not re-generate the existing ChangeLog; rather make the ChangeLog
44 generation script smart enough to only append
45 - Solves the "messages not same" problem for existing commits
46 * Use a separator in the commit message like "== \n" to denote that
47 everything after this is dev-only information and should be skipped
48 from the user ChangeLog
49 - Solves the problem for people who like to add extra dev-only info
50 in the CVS commit message
51 * Ignore commits with "[$tag][trivial]" in the tag[2] from being added
52 to ChangeLog
53 - Keeps the wishes of the developer and does not pollute ChangeLog
54 with such info
55
56
57 1. http://live.gnome.org/Git/ChangeLog
58 2. http://live.gnome.org/Git/CommitMessages
59 --
60 ~Nirbheek Chauhan
61
62 Gentoo GNOME+Mozilla Team

Replies