bh@282: # Copyright (C) 2008, 2009 by Intevation GmbH bh@282: # Authors: bh@282: # Bernhard Herzog bh@282: # bh@282: # This program is free software under the GPL (>=v2) bh@282: # Read the file COPYING coming with the software for details. bh@282: bh@282: """Tests for the treepkg.subversion module""" bh@282: bh@282: bh@282: import unittest bh@282: bh@282: from treepkg.subversion import extract_tag_revisions bh@282: bh@282: bh@282: class TestTagDetector(unittest.TestCase): bh@282: bh@282: def test_tag_changes_count_one_copy_command(self): bh@282: xml = """\ bh@282: bh@282: bh@282: bh@282: tmcguire bh@282: 2009-07-24T11:01:19.722901Z bh@282: bh@282: /branches/kdepim/enterprise/kdepim/kontact/src/main.cpp bh@282: /branches/kdepim/enterprise/kdepim/kmail/kmversion.h bh@282: /branches/kdepim/enterprise/kdepim/korganizer/version.h bh@282: bh@282: SVN_SILENT Update version numbers for today's release. bh@282: bh@282: bh@282: tmcguire bh@282: 2009-07-24T11:02:47.403605Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim bh@282: bh@282: SVN_SILENT Tag kdepim. bh@282: bh@282: bh@282: winterz bh@282: 2009-07-29T13:23:42.262028Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim/libkcal/scheduler.cpp bh@282: bh@282: merge SVN commit 1004159 by winterz: bh@282: bh@282: Allow an attendee to decline an new invitation without getting the error bh@282: message that the event couldn't be found in their calendar. bh@282: kolab/issue3780 bh@282: bh@282: bh@282: bh@282: bh@282: winterz bh@282: 2009-07-30T13:34:18.385413Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim/kmail/newfolderdialog.cpp bh@282: bh@282: merge SVN commit 1004535 by tmcguire: bh@282: bh@282: Fix silly crash when creating a folder. bh@282: bh@282: kolab/issue3777 bh@282: bh@282: bh@282: bh@282: winterz bh@282: 2009-07-30T15:25:19.331744Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim/libkcal/incidenceformatter.cpp bh@282: bh@282: merge SVN commit 1004601 by winterz: bh@282: bh@282: possible fix for kolab/issue3724 and kolab/issue3780, whereby multiple bh@282: persons having write access to a folder can confuse things for other bh@282: users accessing that folder. bh@282: bh@282: bh@282: bh@282: bh@282: """ bh@282: # bh@282: bh@282: self.assertEquals(extract_tag_revisions(xml), bh@282: ["1001837", "1004164", "1004558", "1004604"]) bh@282: bh@282: bh@282: def test_tag_changes_count_two_copy_commands(self): bh@282: xml = """\ bh@282: bh@282: bh@282: bh@282: tmcguire bh@282: 2009-07-24T11:01:19.722901Z bh@282: bh@282: /branches/kdepim/enterprise/kdepim/kontact/src/main.cpp bh@282: /branches/kdepim/enterprise/kdepim/kmail/kmversion.h bh@282: /branches/kdepim/enterprise/kdepim/korganizer/version.h bh@282: bh@282: SVN_SILENT Update version numbers for today's release. bh@282: bh@282: bh@282: tmcguire bh@282: 2009-07-24T11:02:47.403605Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim bh@282: bh@282: SVN_SILENT Tag kdepim. bh@282: bh@282: bh@282: winterz bh@282: 2009-07-29T13:23:42.262028Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim/libkcal/scheduler.cpp bh@282: bh@282: merge SVN commit 1004159 by winterz: bh@282: bh@282: Allow an attendee to decline an new invitation without getting the error bh@282: message that the event couldn't be found in their calendar. bh@282: kolab/issue3780 bh@282: bh@282: bh@282: bh@282: bh@282: winterz bh@282: 2009-07-30T13:34:18.385413Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim/kmail/newfolderdialog.cpp bh@282: bh@282: merge SVN commit 1004535 by tmcguire: bh@282: bh@282: Fix silly crash when creating a folder. bh@282: bh@282: kolab/issue3777 bh@282: bh@282: bh@282: bh@282: winterz bh@282: 2009-07-30T15:25:19.331744Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim/libkcal/incidenceformatter.cpp bh@282: bh@282: merge SVN commit 1004601 by winterz: bh@282: bh@282: possible fix for kolab/issue3724 and kolab/issue3780, whereby multiple bh@282: persons having write access to a folder can confuse things for other bh@282: users accessing that folder. bh@282: bh@282: bh@282: bh@282: bh@282: somebody bh@282: 2009-07-24T12:02:47.403605Z bh@282: bh@282: /tags/kdepim/enterprise35.0.20090724.1001831/kdepim bh@282: bh@282: ficticious commit that looks like the earlier copy that created the tag. bh@282: bh@282: bh@282: bh@282: """ bh@282: # bh@282: bh@282: self.assertEquals(extract_tag_revisions(xml), bh@282: ["901837", "1004164", "1004558", "1004604", bh@282: "1005000"])