aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'RepSys/log.py')
-rw-r--r--RepSys/log.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/RepSys/log.py b/RepSys/log.py
index ea5c798..931ba5d 100644
--- a/RepSys/log.py
+++ b/RepSys/log.py
@@ -306,18 +306,20 @@ def svn2rpm(pkgdirurl, rev=None, size=None, submit=False, template=None):
# look for commits that have been not submited (released) yet
# this is done by getting all log entries newer (revision larger)
- # than releaseslog[0]
+ # than releaseslog[0] (in the case it exists)
if releaseslog:
latest_revision = releaseslog[0].revision
- notsubmitted = [entry for entry in currentlog
- if entry.revision > latest_revision]
- if notsubmitted:
- # if they are not submitted yet, what we have to do is to add
- # a release/version number from getrelease()
- version, release = getrelease(pkgdirurl)
- toprelease = make_release(entries=notsubmitted, released=False,
- version=version, release=release)
- releases.append(toprelease)
+ else:
+ latest_revision = 0
+ notsubmitted = [entry for entry in currentlog
+ if entry.revision > latest_revision]
+ if notsubmitted:
+ # if they are not submitted yet, what we have to do is to add
+ # a release/version number from getrelease()
+ version, release = getrelease(pkgdirurl)
+ toprelease = make_release(entries=notsubmitted, released=False,
+ version=version, release=release)
+ releases.append(toprelease)
data = dump_file(releases[::-1], template=template)
return data