Rev 1952: Fix tests. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Mon Oct 6 21:16:08 BST 2008


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

------------------------------------------------------------
revno: 1952
revision-id: jelmer at samba.org-20081006201606-nexwcwvsw14qohly
parent: jelmer at samba.org-20081006194333-2fo3ak7kt47227p9
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-10-06 22:16:06 +0200
message:
  Fix tests.
modified:
  commit.py                      commit.py-20060607190346-qvq128wgfubhhgm2-1
  tests/__init__.py              __init__.py-20060508151940-e9f4d914801a2535
=== modified file 'commit.py'
--- a/commit.py	2008-10-06 19:43:33 +0000
+++ b/commit.py	2008-10-06 20:16:06 +0000
@@ -15,7 +15,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 """Committing and pushing to Subversion repositories."""
 
-from bzrlib import debug, urlutils, ui
+from bzrlib import debug, urlutils, trace, ui
 from bzrlib.branch import Branch
 from bzrlib.errors import (BzrError, InvalidRevisionId, DivergedBranches, 
                            UnrelatedBranches, AppendRevisionsOnlyViolation,
@@ -133,8 +133,7 @@
     """
     assert file_editor is not None
     txdelta = file_editor.apply_textdelta()
-    #digest = delta.send_stream(StringIO(contents), txdelta)
-    txdelta(None)
+    digest = delta.send_stream(StringIO(contents), txdelta)
     if 'validate' in debug.debug_flags:
         from fetch import md5_strings
         assert digest == md5_strings(contents)
@@ -152,7 +151,7 @@
     """
     def mutter(text, *args):
         if 'commit' in debug.debug_flags:
-            mutter(text, *args)
+            trace.mutter(text, *args)
 
     assert dir_editor is not None
     # Loop over entries of file_id in old_inv
@@ -164,7 +163,7 @@
             # remove if...
             if (
                 # ... path no longer exists
-                not child_ie.file_id in new_inventory or 
+                not child_ie.file_id in new_inv or 
                 # ... parent changed
                 child_ie.parent_id != new_inv[child_ie.file_id].parent_id or
                 # ... name changed
@@ -201,7 +200,7 @@
                 base_revnum)
 
         # open if they existed at the same location
-        elif child_ie.file_id in self.modified_files:
+        elif child_ie.file_id in modified_files:
             mutter('open %s %r', child_ie.kind, new_child_path)
 
             child_editor = dir_editor.open_file(
@@ -549,8 +548,8 @@
                 if replace_existing and self._append_revisions_only:
                     raise AppendRevisionsOnlyViolation(urlutils.join(self.repository.base, self.branch_path))
 
-                if base_path is not None:
-                    base_url = urlutils.join(self.repository.transport.svn_url, base_path)
+                if self.base_path is not None:
+                    base_url = urlutils.join(self.repository.transport.svn_url, self.base_path)
                 else:
                     base_url = None
 
@@ -561,7 +560,7 @@
 
                 dir_editor_send_changes(self.old_inv, self.new_inventory, 
                         "", self.new_inventory.root.file_id, branch_editors[-1],
-                        self.base_url, self.base_revnum, self.branch_path,
+                        base_url, self.base_revnum, self.branch_path,
                         self.modified_files, self.visit_dirs)
 
                 # Set all the revprops

=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2008-10-02 21:18:28 +0000
+++ b/tests/__init__.py	2008-10-06 20:16:06 +0000
@@ -347,6 +347,6 @@
             'mapping3.test_scheme']
     suite.addTest(loader.loadTestsFromModuleNames(["%s.%s" % (__name__, i) for i in testmod_names]))
     suite.addTest(loader.loadTestsFromModuleNames(["bzrlib.plugins.svn.foreign.test_versionedfiles"]))
-    suite.addTest(loader.loadTestsFromModuleNames(["subvertpy.tests.%s" % name for name in 'test_wc', 'test_client', 'test_ra', 'test_repos', 'test_core', 'test_delta', 'test_properties']))
+    suite.addTest(loader.loadTestsFromModuleNames(["subvertpy.tests.%s" % name for name in 'test_wc', 'test_client', 'test_ra', 'test_repos', 'test_core', 'test_delta', 'test_properties', 'test_marshall']))
 
     return suite




More information about the bazaar-commits mailing list