changeset 222:01c043f13f13

Remove the unused PackageTrack.last_packaged_revision method and corresponding tests
author Bernhard Herzog <bh@intevation.de>
date Wed, 07 Jan 2009 19:57:46 +0000
parents 024b309c0520
children 230582ed7329
files test/test_packager.py treepkg/packager.py
diffstat 2 files changed, 2 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/test/test_packager.py	Tue Jan 06 16:45:38 2009 +0000
+++ b/test/test_packager.py	Wed Jan 07 19:57:46 2009 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 by Intevation GmbH
+# Copyright (C) 2007, 2008, 2009 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh@intevation.de>
 #
@@ -265,25 +265,6 @@
         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):
 
--- a/treepkg/packager.py	Tue Jan 06 16:45:38 2009 +0000
+++ b/treepkg/packager.py	Wed Jan 07 19:57:46 2009 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 by Intevation GmbH
+# Copyright (C) 2007, 2008, 2009 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh@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.
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)