Support data directory indices in YAML
[mudpy.git] / bin / git2gch
index 70a8de6..a8fd1a9 100755 (executable)
@@ -1,16 +1,17 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
-u"""Generates potential ChangeLog file contents from commit messages."""
+"""Generates potential ChangeLog file contents from commit messages."""
 
 
-# Copyright (c) 2010 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2010-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission
 # to use, copy, modify, and distribute this software is granted under
 # terms provided in the LICENSE file distributed with this software.
 
 # to use, copy, modify, and distribute this software is granted under
 # terms provided in the LICENSE file distributed with this software.
 
-# needs GitPython: http://gitorious.org/git-python
-import git, time
+import time
+
+import git
 
 copyright = """\
 
 copyright = """\
-Copyright (c) 2004-2010 Jeremy Stanley <fungi@yuggoth.org>. Permission to
+Copyright (c) 2004-2014 Jeremy Stanley <fungi@yuggoth.org>. Permission to
 use, copy, modify, and distribute this software is granted under terms
 provided in the LICENSE file distributed with this software.
 
 use, copy, modify, and distribute this software is granted under terms
 provided in the LICENSE file distributed with this software.
 
@@ -28,15 +29,17 @@ End:\
 
 generated = ""
 for commit in git.Repo().log():
 
 generated = ""
 for commit in git.Repo().log():
-   header = "%s  %s  <%s>" % (
-      time.strftime("%Y-%m-%d %H:%M:%S UTC", commit.authored_date),
-      commit.author.name,
-      commit.author.email
-   )
-   comments = ""
-   for line in commit.message.split("\n")[1:]:
-      if line: line = "\t%s" % line
-      if line.startswith("\t*"): line = "\n%s" % line
-      comments += "%s\n" % line
-   generated += "%s\n%s\n" % ( header, comments)
-print( "%s%s%s" % (generated, copyright, emacsinfo) )
+    header = "%s  %s  <%s>" % (
+        time.strftime("%Y-%m-%d %H:%M:%S UTC", commit.authored_date),
+        commit.author.name,
+        commit.author.email
+    )
+    comments = ""
+    for line in commit.message.split("\n")[1:]:
+        if line:
+            line = "\t%s" % line
+        if line.startswith("\t*"):
+            line = "\n%s" % line
+        comments += "%s\n" % line
+    generated += "%s\n%s\n" % (header, comments)
+print("%s%s%s" % (generated, copyright, emacsinfo))