aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/log.py
diff options
context:
space:
mode:
authorAndreas Hasenack <andreas@mandriva.com>2006-10-17 13:27:25 +0000
committerAndreas Hasenack <andreas@mandriva.com>2006-10-17 13:27:25 +0000
commit9581f2057ad7f6fb6fbb2f372b28a088a258d60a (patch)
tree2b397922fba6ab9cdac0e75425c1158a2c323051 /RepSys/log.py
parent8e97dc246c1b0d09fac1c3d1813bdf4ee7b38d73 (diff)
downloadmgarepo-9581f2057ad7f6fb6fbb2f372b28a088a258d60a.tar
mgarepo-9581f2057ad7f6fb6fbb2f372b28a088a258d60a.tar.gz
mgarepo-9581f2057ad7f6fb6fbb2f372b28a088a258d60a.tar.bz2
mgarepo-9581f2057ad7f6fb6fbb2f372b28a088a258d60a.tar.xz
mgarepo-9581f2057ad7f6fb6fbb2f372b28a088a258d60a.zip
- added Warly's patch to make log.py cope with packages
which have no markrelease
Diffstat (limited to 'RepSys/log.py')
-rw-r--r--RepSys/log.py44
1 files changed, 23 insertions, 21 deletions
diff --git a/RepSys/log.py b/RepSys/log.py
index 0c49d12..feca06a 100644
--- a/RepSys/log.py
+++ b/RepSys/log.py
@@ -266,17 +266,18 @@ def svn2rpm(pkgdirurl, rev=None, size=None, submit=False, template=None):
# for the emergency bug fixer: the [].sort() is done using the
# decorate-sort-undecorate pattern
releases_data = []
- for relentry in releaseslog[::-1]:
- try:
- revinfo = parse_repsys_entry(relentry)
- except InvalidEntryError:
- continue
- try:
- release_number = int(revinfo["revision"])
- except (KeyError, ValueError):
- raise Error, "Error parsing data from log entry from r%s" % \
- relentry.revision
- releases_data.append((release_number, relentry, revinfo))
+ if releaseslog:
+ for relentry in releaseslog[::-1]:
+ try:
+ revinfo = parse_repsys_entry(relentry)
+ except InvalidEntryError:
+ continue
+ try:
+ release_number = int(revinfo["revision"])
+ except (KeyError, ValueError):
+ raise Error, "Error parsing data from log entry from r%s" % \
+ relentry.revision
+ releases_data.append((release_number, relentry, revinfo))
releases_data.sort()
for release_number, relentry, revinfo in releases_data:
@@ -311,16 +312,17 @@ 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]
- 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)
+ 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)
data = dump_file(releases[::-1], template=template)
return data