aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/log.py
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2006-10-19 16:42:41 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2006-10-19 16:42:41 +0000
commit0b137c7f5d5141717297e8e063b820f35de64eca (patch)
tree24462cb8406551f9c5fe0828d3dce4d0757b05f7 /RepSys/log.py
parent873ecb640b59a97b4d2ec1b00c2d2413f28d9475 (diff)
downloadmgarepo-0b137c7f5d5141717297e8e063b820f35de64eca.tar
mgarepo-0b137c7f5d5141717297e8e063b820f35de64eca.tar.gz
mgarepo-0b137c7f5d5141717297e8e063b820f35de64eca.tar.bz2
mgarepo-0b137c7f5d5141717297e8e063b820f35de64eca.tar.xz
mgarepo-0b137c7f5d5141717297e8e063b820f35de64eca.zip
- fixed bug introducted in r65890, in which it was ignoring unreleased
revisions when the package had no releases.
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