]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 28 Oct 2006 19:17:42 +0000 (19:17 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 28 Oct 2006 19:17:42 +0000 (19:17 +0000)
.gitignore
ChangeLog
buildscripts/git-update-changelog.py [new file with mode: 0644]

index af8a8284291d982dfb6bfa6da3b0e981ecdb92ca..849b7705d32664877b3db16daac26ef943cc9874 100644 (file)
@@ -7,4 +7,10 @@ GNUmakefile
 aclocal.m4
 autom4te.cache
 configure
-
+*.ps
+*.eps
+*.pdf
+TAGS
+tags
+.gdbinit
+?.ly
index e7c5ce8b310fef76030619440d2732a1143839e5..91a218320b49048d1492f0c7234ba6afc2453559 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,53 @@
+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: 
@@ -17,7 +67,8 @@
 
 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>
 
diff --git a/buildscripts/git-update-changelog.py b/buildscripts/git-update-changelog.py
new file mode 100644 (file)
index 0000000..a2c3e53
--- /dev/null
@@ -0,0 +1,155 @@
+#!/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 ()
+    
+    
+