diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2006-02-16 15:59:58 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2006-02-16 15:59:58 +0000 |
commit | b8e58f4a5856da0b59277d8a5c4c045142109687 (patch) | |
tree | 2429e7db465a2d6f58f160fad2a5db615048ab6d /RepSys/log.py | |
parent | e80d78061e8504ae46877e9d2dcba2d88b5f4f4e (diff) | |
download | mgarepo-b8e58f4a5856da0b59277d8a5c4c045142109687.tar mgarepo-b8e58f4a5856da0b59277d8a5c4c045142109687.tar.gz mgarepo-b8e58f4a5856da0b59277d8a5c4c045142109687.tar.bz2 mgarepo-b8e58f4a5856da0b59277d8a5c4c045142109687.tar.xz mgarepo-b8e58f4a5856da0b59277d8a5c4c045142109687.zip |
- added support "day zero revision"
Diffstat (limited to 'RepSys/log.py')
-rw-r--r-- | RepSys/log.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/RepSys/log.py b/RepSys/log.py index 6e80a13..a7210a6 100644 --- a/RepSys/log.py +++ b/RepSys/log.py @@ -239,21 +239,31 @@ def parse_repsys_entry(revlog): return data +def get_revision_offset(): + try: + revoffset = config.getint("global", "revision-offset", 0) + except (ValueError, TypeError): + raise Error, ("Invalid revision-offset number in configuration " + "file(s).") + return revoffset + def svn2rpm(pkgdirurl, rev=None, size=None, submit=False, template=None): concat = config.get("log", "concat", "").split() + revoffset = get_revision_offset() svn = SVN(baseurl=pkgdirurl) pkgreleasesurl = os.path.join(pkgdirurl, "releases") pkgcurrenturl = os.path.join(pkgdirurl, "current") releaseslog = svn.log(pkgreleasesurl, noerror=1) - currentlog = svn.log(pkgcurrenturl, start=rev) - if size is not None: - currentlog = currentlog[:size] + currentlog = svn.log(pkgcurrenturl, limit=size, start=rev, + end=revoffset) lastauthor = None previous_revision = 0 currelease = None releases = [] + # for the emergency bug fixer: the [].sort() is done using the + # decorate-sort-undecorate pattern releases_data = [] for relentry in releaseslog[::-1]: try: |