+2006-10-28 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ git commit 64179afe25bf5723fe9bb5a6631799c050d12de2
+
+ * buildscripts/git-update-changelog.py:
+ ignore ChangeLog
+
+ git commit 614460c52e72c96824da0a583297123e510f6fff
+
+ * .gitignore:
+ update
+
+ git commit 6ca40e8913957dd9fa510855ae1c4efacde09603
+
+ * ChangeLog:
+ * buildscripts/git-update-changelog.py:
+ script to update ChangeLog with Git messages.
+
+ git commit ef70710d3cf52502900408aa1f55a2354ed4e8ab
+
+ * lily/beam-engraver.cc:
+ * input/regression/rest-pitched-beam.ly:
+ don't set callback if staff-position set. Fixes #126.
+
+ git commit 6dcaa230251aa4f95e4153bd4de021c65207b798
+
+ * lily/bar-number-engraver.cc:
+ * lily/beam.cc:
+ * lily/fingering-engraver.cc:
+ * lily/grob-property.cc:
+ * lily/grob.cc:
+ * lily/include/grob.hh:
+ * lily/include/lily-guile-macros.hh:
+ * lily/mark-engraver.cc:
+ * lily/melody-engraver.cc:
+ * lily/script-column.cc:
+ * lily/tie-formatting-problem.cc:
+ * lily/tie.cc:
+ internal_get_property_data() using ly_symbol2scm()
+
+ git commit 914e47b38f98b87c2622a5bbd8237ca97f97da34
+
+ * stepmake/stepmake/generic-targets.make:
+ create .gitignore in outdir.
+
+ git commit 122da86232bb745d50cddbd893e3cc48c3af6216
+
+ * .gitignore:
+ new file.
+
2006-10-28 Jan Nieuwenhuizen <janneke@gnu.org>
* input/test/vertical-extent.ly:
2006-10-27 Han-Wen Nienhuys <hanwen@lilypond.org>
- * mf/GNUmakefile: explicit dependencies for emmentaler .otf-table files.
+ * mf/GNUmakefile: explicit dependencies for emmentaler .otf-table
+ files.
* Documentation/topdocs/NEWS.tely (Top): add FretBoards example.
2006-10-26 Graham Percival <gpermus@gmail.com>
- * Documentation/user/ {basic-, global}: minor changes from mailist.
+ * Documentation/user/{basic-, global}: minor changes from mailist.
2006-10-26 Erlend Aasland <erlenda@gmail.com>
--- /dev/null
+#!/usr/bin/python
+
+import time
+import os
+import re
+import optparse
+
+def read_pipe (x):
+ print 'pipe', x
+ return os.popen (x).read ()
+
+class Commit:
+ def __init__ (self, dict):
+ for v in ('message',
+ 'date',
+ 'author',
+ 'committish'):
+ self.__dict__[v] = dict[v]
+
+ # Sat Oct 28 18:52:30 2006 +0200
+
+ self.date = ' '.join (self.date.split (' ')[:-1])
+ self.date = time.strptime (self.date, '%a %b %d %H:%M:%S %Y')
+
+ m = re.search ('(.*)<(.*)>', self.author)
+ self.email = m.group (2)
+ self.name = m.group (1)
+
+ def touched_files (self):
+
+ files = []
+ def note_file (x):
+ files.append (x.group (1))
+ return ''
+
+ diff = read_pipe ('git show %s' % self.committish)
+ re.sub ('\n--- a/([^\n]+)\n',
+ note_file, diff)
+ re.sub('\n--- /dev/null\n\\+\\+\\+ b/([^\n]+)',
+ note_file, diff)
+
+ return files
+
+def parse_commit_log (log):
+ print log
+
+ committish = re.search ('^([^\n]+)', log).group (1)
+ author = re.search ('\nAuthor:\s+([^\n]+)', log).group (1)
+ date_match = re.search ('\nDate:\s+([^\n]+)', log)
+ date = date_match.group (1)
+ log = log[date_match.end (1):]
+
+ message = re.sub ("\n *", '', log)
+ message = message.strip ()
+
+ c = Commit (locals ())
+ return c
+
+def parse_add_changes (from_commit):
+
+ log = read_pipe ('git log %(from_commit)s..' % locals ())
+
+ log = log[len ('commit '):]
+ log = log.strip ()
+
+ if not log:
+ return []
+
+ commits = map (parse_commit_log, re.split ('\ncommit ', log))
+
+ return commits
+
+
+def header (commit):
+ return '%d-%02d-%02d %s <%s>\n' % (commit.date[:3] + (commit.name, commit.email))
+
+def changelog_body (commit):
+
+ s = ''
+ s += "\ngit commit %s\n" % commit.committish
+ s += ''.join ('\n* %s: ' % f for f in commit.touched_files())
+ s += '\n' + commit.message
+
+ s = s.replace ('\n', '\n\t')
+ s += '\n'
+ return s
+
+def find_last_checked_in_commit (log):
+ m = re.match ('^(\\d+-\\d+-\\d+)[^\n]+\n*\tgit commit ([a-f0-9]+)', log)
+
+ if m:
+ return (m.group (1), m.group (2))
+
+ return None
+
+
+
+
+def main ():
+ p = optparse.OptionParser ("usage git-update-changelog.py --options")
+ p.add_option ("--start",
+ action='store',
+ default='',
+ dest="start",
+ help="start of log messages to merge.")
+
+ (options, args) = p.parse_args ()
+
+ log = open ('ChangeLog').read ()
+
+ if not options.start:
+ (time, id) = find_last_checked_in_commit (log)
+ options.start = id
+
+ print 'processing commits from ', id, options.start
+
+ commits = parse_add_changes (options.start)
+ if not commits:
+ return
+
+ new_log = ''
+ last_commit = None
+
+ first = header (commits[0]) + '\n'
+ if first == log[:len (first)]:
+ log = log[len (first):]
+
+ for c in commits:
+ if c.touched_files () == ['ChangeLog']:
+ continue
+
+ if (last_commit
+ and c.author != last_commit.author
+ and c.date[:3] != last_commit.date[:3]):
+
+ new_log += header (last_commit)
+
+ new_log += changelog_body (c)
+ last_commit = c
+
+ new_log = header (last_commit) + new_log + '\n'
+
+ log = new_log + log
+ try:
+ os.unlink ('ChangeLog~')
+ except IOError:
+ pass
+
+ os.rename ('ChangeLog', 'ChangeLog~')
+ open ('ChangeLog', 'w').write (log)
+
+main ()
+
+
+