From 571bfd44bb51b2380dcde630ecee3a411b48d98e Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Fri, 16 May 2008 13:04:30 +0200 Subject: avoid naming conflict --- git-dch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'git-dch') 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 -- cgit v1.2.3