From bce262fa2138d595d957313593ba98efe60e9e2d Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 6 Aug 2014 14:38:51 +0000 Subject: [PATCH] Remove the git2gch utility The git2gch utility was previously used to generate GNU-style ChangeLog files from Git commit history, but there are useful existing tools for this now and it's out of scope for mudpy. --- bin/git2gch | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100755 bin/git2gch diff --git a/bin/git2gch b/bin/git2gch deleted file mode 100755 index a8fd1a9..0000000 --- a/bin/git2gch +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -"""Generates potential ChangeLog file contents from commit messages.""" - -# Copyright (c) 2010-2014 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. - -import time - -import git - -copyright = """\ -Copyright (c) 2004-2014 Jeremy Stanley . Permission to -use, copy, modify, and distribute this software is granted under terms -provided in the LICENSE file distributed with this software. - -""" - -emacsinfo = "\f" + """ -Local Variables: -mode: change-log -coding: utf-8 -left-margin: 8 -fill-column: 76 -version-control: never -End:\ -""" - -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)) -- 2.11.0