Rev 28: Mark as 1.0.0. in file:///data/jelmer/bzr-cia/trunk/

Jelmer Vernooij jelmer at samba.org
Mon Sep 24 06:31:50 BST 2007


At file:///data/jelmer/bzr-cia/trunk/

------------------------------------------------------------
revno: 28
revision-id: jelmer at samba.org-20070923233159-ab1k4zjh1z88cx91
parent: jelmer at samba.org-20070825104106-67vdrpqc03ywl98w
parent: jelmer at samba.org-20070903165315-om4nlu3oko31rzu7
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2007-09-24 01:31:59 +0200
message:
  Mark as 1.0.0.
added:
  TODO                           todo-20070903161539-1z63qftzxi8x01b2-1
  tests/test_backlog.py          test_backlog.py-20070903162007-a1e35qwx2x3f7mct-1
modified:
  __init__.py                    __init__.py-20060326151358-eca40ae045b6d836
  setup.py                       setup.py-20061022000928-ilcgm1v36zy99tdv-1
  tests/__init__.py              __init__.py-20070312123353-6u1l6vu99nn9q74s-2
  tests/test_cmds.py             test_cmds.py-20070530181350-zxhosb9fqyh7j2o4-1
  tests/test_xml.py              test_xml.py-20070530190119-zckpjlrtehsz5r6f-1
    ------------------------------------------------------------
    revno: 27.1.1
    revision-id: jelmer at samba.org-20070903165315-om4nlu3oko31rzu7
    parent: jelmer at samba.org-20070825104106-67vdrpqc03ywl98w
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Mon 2007-09-03 18:53:15 +0200
    message:
      Fix tests
    modified:
      tests/test_cmds.py             test_cmds.py-20070530181350-zxhosb9fqyh7j2o4-1
      tests/test_xml.py              test_xml.py-20070530190119-zckpjlrtehsz5r6f-1
=== added file 'TODO'
--- a/TODO	1970-01-01 00:00:00 +0000
+++ b/TODO	2007-09-23 23:31:59 +0000
@@ -0,0 +1,2 @@
+- keep list of commits that failed to be announced on CIA
+- allow sending notifications for those commits

=== added file 'tests/test_backlog.py'
--- a/tests/test_backlog.py	1970-01-01 00:00:00 +0000
+++ b/tests/test_backlog.py	2007-09-23 23:31:59 +0000
@@ -0,0 +1,36 @@
+# Copyright (C) 2006-2007 Jelmer Vernooij <jelmer at samba.org>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+"""Blackbox tests."""
+
+import bzrlib
+from bzrlib.plugins.cia import BacklogList
+from bzrlib.tests import TestCaseInTempDir
+from bzrlib.trace import mutter
+
+import os
+
+class BacklogTests(TestCaseInTempDir):
+    def test_add_revision(self):
+        b = BacklogList("afile")
+        b.add_revision("myrevision")
+        self.assertFileEqual("afile", "myrevision\n")
+
+    def test_read_revisions(self):
+        b = BacklogList("afile")
+        b.add_revision("myrevision")
+        b.add_revision("otherrevision")
+        self.assertEquals(set(["myrevision", "otherrevision"]), b.read_revisions())
+        

=== modified file '__init__.py'
--- a/__init__.py	2007-08-25 10:41:06 +0000
+++ b/__init__.py	2007-09-23 23:31:59 +0000
@@ -23,7 +23,8 @@
 inside that branch
 """
 
-__version__ = '0.17.0'
+version_info = (1, 0, 0)
+__version__ = '%d.%d.%d' % version_info
 
 import sys
 import xmlrpclib
@@ -54,6 +55,17 @@
         return cia_submit(local, new_revid, new_revno)
 
 
+class BacklogList:
+    def __init__(self, filename):
+        self.filename = filename
+
+    def add_revision(self, revid):
+        pass
+
+    def read_revisions(self):
+        pass
+
+
 def generate_cia_xml(repository, revid, project, revname=None, author=None):
     revision = repository.get_revision(revid)
     delta = repository.get_revision_delta(revid)

=== modified file 'setup.py'
--- a/setup.py	2007-05-30 21:12:54 +0000
+++ b/setup.py	2007-09-23 23:31:59 +0000
@@ -4,7 +4,7 @@
 
 setup(
     name = "cia",
-    version = "0.17.0",
+    version = "1.0.0",
     maintainer = "Jelmer Vernooij",
     maintainer_email = "jelmer at samba.org",
     description = "CIA submit plugin for Bazaarr",

=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2007-05-30 19:15:03 +0000
+++ b/tests/__init__.py	2007-09-23 23:31:59 +0000
@@ -25,7 +25,7 @@
 
     suite = TestSuite()
 
-    testmod_names = ['test_cmds', 'test_xml']
+    testmod_names = ['test_backlog', 'test_cmds', 'test_xml']
 
     suite.addTest(loader.loadTestsFromModuleNames(["%s.%s" % (__name__, i) for i in testmod_names]))
 

=== modified file 'tests/test_cmds.py'
--- a/tests/test_cmds.py	2007-05-30 19:15:03 +0000
+++ b/tests/test_cmds.py	2007-09-03 16:53:15 +0000
@@ -43,8 +43,7 @@
         os.chdir("bla")
         self.run_bzr('cia-project', 'myproject')
 
-        self.assertEquals("""Submitting revision to CIA.
-
+        self.assertEqualDiff("""
 <message>
   <generator> 
     <name>bzr</name> 

=== modified file 'tests/test_xml.py'
--- a/tests/test_xml.py	2007-05-30 19:15:03 +0000
+++ b/tests/test_xml.py	2007-09-03 16:53:15 +0000
@@ -30,7 +30,7 @@
 
         xml = generate_cia_xml(tree.branch.repository, revid, "myproject")
 
-        self.assertEquals("""
+        self.assertEqualDiff("""
 <message>
   <generator> 
     <name>bzr</name> 
@@ -60,7 +60,7 @@
         xml = generate_cia_xml(tree.branch.repository, revid, "myproject", 
                 author="somebody")
 
-        self.assertEquals("""
+        self.assertEqualDiff("""
 <message>
   <generator> 
     <name>bzr</name> 
@@ -90,7 +90,7 @@
         xml = generate_cia_xml(tree.branch.repository, revid, "myproject", 
                 revname="42", author="somebody")
 
-        self.assertEquals("""
+        self.assertEqualDiff("""
 <message>
   <generator> 
     <name>bzr</name> 




More information about the bazaar-commits mailing list