[Treepkg-commits] r148 - in trunk: test treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jan 7 20:57:47 CET 2009
Author: bh
Date: 2009-01-07 20:57:46 +0100 (Wed, 07 Jan 2009)
New Revision: 148
Modified:
trunk/test/test_packager.py
trunk/treepkg/packager.py
Log:
Remove the unused PackageTrack.last_packaged_revision method and
corresponding tests
Modified: trunk/test/test_packager.py
===================================================================
--- trunk/test/test_packager.py 2009-01-06 16:45:38 UTC (rev 147)
+++ trunk/test/test_packager.py 2009-01-07 19:57:46 UTC (rev 148)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 by Intevation GmbH
+# Copyright (C) 2007, 2008, 2009 by Intevation GmbH
# Authors:
# Bernhard Herzog <bh at intevation.de>
#
@@ -265,26 +265,7 @@
track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
self.assertEquals(track.get_revision_numbers(), [702432, 704195])
- def test_last_packaged_revision_with_no_revisions(self):
- trackdir = self.create_files("track", [("pkg", [])])
- track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
- self.assertEquals(track.last_packaged_revision(), -1)
- def test_last_packaged_revision_several_revisions(self):
- trackdir = self.create_files("track",
- [("pkg",
- [("704195-1",
- [("status", ""),
- ("src", []),
- ("binary", [])]),
- ("702432-1",
- [("status", ""),
- ("src", []),
- ("binary", [])])])])
- track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
- self.assertEquals(track.last_packaged_revision(), 704195)
-
-
class TestRevisionPackager(unittest.TestCase, FileTestMixin):
# def setUp(self):
Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py 2009-01-06 16:45:38 UTC (rev 147)
+++ trunk/treepkg/packager.py 2009-01-07 19:57:46 UTC (rev 148)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 by Intevation GmbH
+# Copyright (C) 2007, 2008, 2009 by Intevation GmbH
# Authors:
# Bernhard Herzog <bh at intevation.de>
#
@@ -403,14 +403,6 @@
revisions.sort()
return revisions
- def last_packaged_revision(self):
- """Returns the revision number of the highest packaged revision.
-
- If the revision cannot be determined because no already packaged
- revisions can be found, the function returns -1.
- """
- return max([-1] + self.get_revision_numbers())
-
def update_checkout(self, revision=None):
"""Updates the working copy of self.svn_url in self.checkout_dir.
More information about the Treepkg-commits
mailing list