No subject


Fri Nov 28 17:05:26 GMT 2008


unstackable branch format that pass the test suite, I modified
loom to be explicit about that. (Since it didn't pass the test
suite I thought it was a valid modification until loom support
stacking).

I had to modify some tests to reach that point.

I also fixed a typo in test_osutils.TestChunksToLines.test_is_compiled.

  Vincent

P.S.: I missed one failing test in my previous submission, bad
vila, stop abusing 'selftest -s' :)


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=selftest-stacking-3913.patch
Content-Description: BZR merge

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: v.ladeuil+lp at free.fr-20081218142401-m1wr8r70u051aym6
# target_branch: http://bazaar-vcs.org/bzr/bzr.dev
# testament_sha1: a0eae307d29aaf6514434d6c229020bd7a1d9d8b
# timestamp: 2008-12-18 15:24:19 +0100
# base_revision_id: pqm at pqm.ubuntu.com-20081217102138-pz7pfli9o3k50zq7
# 
# Begin patch
=== modified file 'bzrlib/tests/branch_implementations/test_push.py'
--- bzrlib/tests/branch_implementations/test_push.py	2008-12-16 04:13:39 +0000
+++ bzrlib/tests/branch_implementations/test_push.py	2008-12-18 13:34:25 +0000
@@ -187,8 +187,9 @@
         default for the branch), and will be stacked when the repo format
         allows (which means that the branch format isn't necessarly preserved).
         """
-        if isinstance(self.branch_format, branch.BzrBranchFormat4):
-            raise tests.TestNotApplicable('Not a metadir format.')
+        if not self.branch_format.supports_stacking():
+            raise tests.TestNotApplicable('%r does not support stacking'
+                                    % self.branch_format)
         if isinstance(self.branch_format, branch.BranchReferenceFormat):
             # This test could in principle apply to BranchReferenceFormat, but
             # make_branch_builder doesn't support it.

=== modified file 'bzrlib/tests/branch_implementations/test_stacking.py'
--- bzrlib/tests/branch_implementations/test_stacking.py	2008-12-01 23:50:52 +0000
+++ bzrlib/tests/branch_implementations/test_stacking.py	2008-12-18 12:55:28 +0000
@@ -263,11 +263,11 @@
         parent_bzrdir = self.make_bzrdir('.', format='default')
         parent_bzrdir.get_config().set_default_stack_on('stack-on')
         source = self.make_branch('source')
-        target = source.bzrdir.sprout('target').open_branch()
         try:
+            target = source.bzrdir.sprout('target').open_branch()
             self.assertEqual('../stack-on', target.get_stacked_on_url())
-        except errors.UnstackableBranchFormat:
-            pass
+        except errors.UnstackableBranchFormat, e:
+            raise TestNotApplicable(e)
 
     def test_clone_stacking_policy_handling(self):
         """Obey policy where possible, ignore otherwise."""
@@ -275,11 +275,11 @@
         parent_bzrdir = self.make_bzrdir('.', format='default')
         parent_bzrdir.get_config().set_default_stack_on('stack-on')
         source = self.make_branch('source')
-        target = source.bzrdir.clone('target').open_branch()
         try:
+            target = source.bzrdir.clone('target').open_branch()
             self.assertEqual('../stack-on', target.get_stacked_on_url())
-        except errors.UnstackableBranchFormat:
-            pass
+        except errors.UnstackableBranchFormat, e:
+            raise TestNotApplicable(e)
 
     def prepare_stacked_on_fetch(self):
         stack_on = self.make_branch_and_tree('stack-on')
@@ -407,6 +407,9 @@
         self.assertEqual(['../stack-on'], hook_calls)
 
     def test_stack_on_repository_branch(self):
+        if not self.branch_format.supports_stacking():
+            raise TestNotApplicable('%r does not support stacking'
+                                    % self.branch_format)
         # Stacking should work when the repo isn't co-located with the
         # stack-on branch.
         try:
@@ -415,10 +418,7 @@
             raise TestNotApplicable()
         # Avoid make_branch, which produces standalone branches.
         bzrdir = self.make_bzrdir('repo/stack-on')
-        try:
-            b = bzrdir.create_branch()
-        except errors.UninitializableFormat:
-            raise TestNotApplicable()
+        b = bzrdir.create_branch()
         transport = self.get_transport('stacked')
         b.bzrdir.clone_on_transport(transport, stacked_on=b.base)
         # Ensure that opening the branch doesn't raise.

=== modified file 'bzrlib/tests/test_osutils.py'
--- bzrlib/tests/test_osutils.py	2008-12-11 03:08:03 +0000
+++ bzrlib/tests/test_osutils.py	2008-12-18 14:24:01 +0000
@@ -765,8 +765,8 @@
                          osutils.chunks_to_lines(['foo\n', 'bar\n', 'baz\n']))
 
     def test_is_compiled(self):
-        from bzrlib.tests.test__chunks_to_lines import CompiledChunksToLinesFeature
-        if CompiledChunksToLinesFeature:
+        from bzrlib.tests import test__chunks_to_lines
+        if test__chunks_to_lines.CompiledChunksToLinesFeature.available():
             from bzrlib._chunks_to_lines_pyx import chunks_to_lines
         else:
             from bzrlib._chunks_to_lines_py import chunks_to_lines

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWczu8hsABSTfgARwU////3sF
TwC////wYAmfPvjaSAAAmwxKJQoSFJSDmmJkyaMJgmJpgEwCGCMCMBzTEyZNGEwTE0wCYBDBGBGA
5piZMmjCYJiaYBMAhgjAjAMRU/REmnqaemoA0AAA0000NB6gaBFJAjIE9BNoKZgozRMho9UBkeka
aCSIBAENCm0m01TYqepvFT9TUAGgA9SKFH89FyOPTZ/FaoYYb515/mMd5Z++A/erj/FgichzNm0X
BzJBMTIIpl1wv6muU1fVLexNhBbS/Kxy1UsxUVT00lpTaeudUK1YA+rRcP0b7DCSJCVOYgVaKqvT
NJ0gwaZatTRvqhTUhNnZpM0M19k1yGhJN5ZdAjA5SH652n4uf44zKKLDR9CkSEgM1uwc5tz3ZQZ2
8tr0mDAmMF6qAYCCQHSLgsFbAo07qAmg2DcvTw6cfn9l2XhA4KxWErm6tC3Y56wjG/xpnUKKacDs
aEXiczUyfU8zSwWko7WJzuSRTRTBmd9vncQVja4uX1SFCxx/0M/yOwwegtQF3GiDinOnyFp3DKal
eukkHHBomPrXpfWQU89Qc0/7sQymUf+UcBptrYJEpSpxkp55HPQG0aDorplbG6KmWjHKUpSlo6+J
YrxgCIJ7C5mk0qhSMEhnJnQGcxVRojj/pP0fSp7XFTBdwvC4wiPOOBQkRsOQYSVIjCmqOe5C7UqS
7aCmv3eo29Iix9GBmMxpSJOsxWeCzzcr5M87zUSWpccEyggxl9MNeWWTqxMYLIMP5GaYY5ieIpkC
Ez7XlcLTz1gqMIWh+DuShS8ViZqLI3mhvPHJB4iyXK+zteceGPDkkgipkiprGCGEltUqQSYbQolP
cXkS1JoKIOt5kaMozHGGDBBm5iY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