rel-eng/lib/spacewalk/releng/tagger.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
New commits:
commit 23b0800c9063f403254e4c5dc300b4201f153f12
Author: jesus m. rodriguez <jesusr(a)redhat.com>
Date: Thu Apr 2 13:04:28 2009 -0400
don't die if this is a new package with no history
diff --git a/rel-eng/lib/spacewalk/releng/tagger.py
b/rel-eng/lib/spacewalk/releng/tagger.py
index 995402f..4c5158e 100644
--- a/rel-eng/lib/spacewalk/releng/tagger.py
+++ b/rel-eng/lib/spacewalk/releng/tagger.py
@@ -123,12 +123,17 @@ class VersionTagger(object):
found_changelog = True
old_version = get_latest_tagged_version(self.project_name)
- last_tag = "%s-%s" % (self.project_name, old_version)
- patch_command = \
- "git log --pretty=format:%%s\ \(%%ae\)" \
- " --relative %s..%s -- %s" % \
- (last_tag, "HEAD", ".")
- output = run_command(patch_command)
+
+ # don't die if this is a new package with no history
+ if old_version != None:
+ last_tag = "%s-%s" % (self.project_name, old_version)
+ patch_command = \
+ "git log --pretty=format:%%s\ \(%%ae\)" \
+ " --relative %s..%s -- %s" % \
+ (last_tag, "HEAD", ".")
+ output = run_command(patch_command)
+ else:
+ output = "new package"
fd, name = tempfile.mkstemp()
os.write(fd, "# No changelog entry found; please edit the
following\n")
Show replies by date