aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-dch
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2008-05-16 13:04:30 +0200
committerGuido Guenther <agx@sigxcpu.org>2008-05-16 13:04:30 +0200
commit571bfd44bb51b2380dcde630ecee3a411b48d98e (patch)
treeb6b27b689e8a64a96e21c73394aa468d9112c39c /git-dch
parent2c1c265e64405c952d1761c531dad590ffe73807 (diff)
avoid naming conflict
Diffstat (limited to 'git-dch')
-rwxr-xr-xgit-dch8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-dch b/git-dch
index 6d055ce2..12268561 100755
--- a/git-dch
+++ b/git-dch
@@ -51,6 +51,7 @@ def add_changelog_section(msg, distribution):
cmd = "dch --no-auto-nmu --distribution=%s -i %s" % (distribution, msg)
system(cmd)
+
def fixup_trailer():
"""fixup the changelog trailer's comitter and email address - it might
otherwise point to the last git committer instead of the person creating
@@ -58,6 +59,7 @@ def fixup_trailer():
cmd = "dch \"\""
system(cmd)
+
def head_commit():
"""get the full sha1 of the last commit on HEAD"""
commit = subprocess.Popen([ 'git-log', 'HEAD^..' ], stdout=subprocess.PIPE).stdout
@@ -139,6 +141,7 @@ def do_snapshot(changelog, next_snapshot):
mangle_changelog(changelog, cp, snapshot, commit)
return snapshot, commit
+
def get_author(commit):
"""get the author from a commit message"""
for line in commit:
@@ -146,14 +149,15 @@ def get_author(commit):
if m:
return m.group('author'), m.group('email')
-def parse_commit(repo, commit,meta, short):
+
+def parse_commit(repo, commitid, meta, short):
"""parse a commit and return message and author"""
msg = ''
thanks = ''
closes = ''
bugs = []
- commit = repo.show(commit)
+ commit = repo.show(commitid)
author, email = get_author(commit)
if not author:
raise GbpError, "can't parse author of commit %s" % commit