Rev 4132: (vila) Trivial cleanups in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Mar 12 11:21:20 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4132
revision-id: pqm at pqm.ubuntu.com-20090312112116-550sw6tk8syaaxku
parent: pqm at pqm.ubuntu.com-20090312104001-k2722d61gjdpb91v
parent: v.ladeuil+lp at free.fr-20090312082749-ypcfh87e8t3f6z23
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-03-12 11:21:16 +0000
message:
  (vila) Trivial cleanups
modified:
  bzrlib/tests/branch_implementations/test_sprout.py test_sprout.py-20070521151739-b8t8p7axw1h966ws-1
  bzrlib/tests/workingtree_implementations/test_parents.py test_set_parents.py-20060807231740-yicmnlci1mj8smu1-1
    ------------------------------------------------------------
    revno: 4127.2.1
    revision-id: v.ladeuil+lp at free.fr-20090312082749-ypcfh87e8t3f6z23
    parent: pqm at pqm.ubuntu.com-20090312075222-g575i2pcrliafetw
    parent: v.ladeuil+lp at free.fr-20090312073148-qrni183iiwen8h50
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: bzr.integration
    timestamp: Thu 2009-03-12 18:27:49 +1000
    message:
      Trivial cleanups
    modified:
      bzrlib/tests/branch_implementations/test_sprout.py test_sprout.py-20070521151739-b8t8p7axw1h966ws-1
      bzrlib/tests/workingtree_implementations/test_parents.py test_set_parents.py-20060807231740-yicmnlci1mj8smu1-1
    ------------------------------------------------------------
    revno: 4095.3.4
    revision-id: v.ladeuil+lp at free.fr-20090312073148-qrni183iiwen8h50
    parent: v.ladeuil+lp at free.fr-20090310233935-i2tksn5trpni6lgx
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: 339055-symlink
    timestamp: Thu 2009-03-12 17:31:48 +1000
    message:
      Some trivial cleanups, related to fix for bug #272444.
    modified:
      bzrlib/tests/branch_implementations/test_sprout.py test_sprout.py-20070521151739-b8t8p7axw1h966ws-1
      bzrlib/tests/workingtree_implementations/test_parents.py test_set_parents.py-20060807231740-yicmnlci1mj8smu1-1
=== modified file 'bzrlib/tests/branch_implementations/test_sprout.py'
--- a/bzrlib/tests/branch_implementations/test_sprout.py	2009-03-09 16:32:31 +0000
+++ b/bzrlib/tests/branch_implementations/test_sprout.py	2009-03-12 07:31:48 +0000
@@ -24,7 +24,6 @@
     revision as _mod_revision,
     tests,
     )
-from bzrlib.tests import KnownFailure, SymlinkFeature, UnicodeFilenameFeature
 from bzrlib.tests.branch_implementations import TestCaseWithBranch
 
 
@@ -132,8 +131,8 @@
         # Since the trigger function seems to be set_parent_trees, there exists
         # also a similar test, with name test_unicode_symlink, in class
         # TestSetParents at file workingtree_implementations/test_parents.py
-        self.requireFeature(SymlinkFeature)
-        self.requireFeature(UnicodeFilenameFeature)
+        self.requireFeature(tests.SymlinkFeature)
+        self.requireFeature(tests.UnicodeFilenameFeature)
 
         tree = self.make_branch_and_tree('tree1')
 
@@ -143,9 +142,7 @@
         os.symlink(u'\u03a9','tree1/link_name')
         tree.add(['link_name'],['link-id'])
 
-        # python 2.7a0 failed on commit:
         revision = tree.commit('added a link to a Unicode target')
-        # python 2.5 failed on sprout:
         tree.bzrdir.sprout('target')
 
     def assertBranchHookBranchIsStacked(self, pre_change_params):
@@ -168,7 +165,8 @@
                 source_branch=source, stacked=True)
         except errors.UnstackableBranchFormat:
             if isinstance(self.branch_format, _mod_branch.BzrBranchFormat4):
-                raise KnownFailure("Format 4 doesn't auto stack successfully.")
+                raise tests.KnownFailure(
+                    "Format 4 doesn't auto stack successfully.")
             else:
                 raise
         result = dir.open_branch()

=== modified file 'bzrlib/tests/workingtree_implementations/test_parents.py'
--- a/bzrlib/tests/workingtree_implementations/test_parents.py	2009-03-09 16:32:31 +0000
+++ b/bzrlib/tests/workingtree_implementations/test_parents.py	2009-03-12 07:31:48 +0000
@@ -24,6 +24,7 @@
     osutils,
     revision as _mod_revision,
     symbol_versioning,
+    tests,
     )
 from bzrlib.inventory import (
     Inventory,
@@ -32,12 +33,6 @@
     InventoryLink,
     )
 from bzrlib.revision import Revision
-from bzrlib.tests import (
-    KnownFailure,
-    SymlinkFeature,
-    TestNotApplicable,
-    UnicodeFilenameFeature,
-    )
 from bzrlib.tests.workingtree_implementations import TestCaseWithWorkingTree
 from bzrlib.uncommit import uncommit
 
@@ -234,8 +229,8 @@
 
     def test_unicode_symlink(self):
         # this tests bug #272444
-        self.requireFeature(SymlinkFeature)
-        self.requireFeature(UnicodeFilenameFeature)
+        self.requireFeature(tests.SymlinkFeature)
+        self.requireFeature(tests.UnicodeFilenameFeature)
 
         tree = self.make_branch_and_tree('tree1')
 
@@ -245,11 +240,8 @@
         os.symlink(u'\u03a9','tree1/link_name')
         tree.add(['link_name'],['link-id'])
 
-        # the actual commit occurs without errors (strangely):
         revision1 = tree.commit('added a link to a Unicode target')
-        # python 2.4 failed with UnicodeDecodeError on this commit:
         revision2 = tree.commit('this revision will be discarded')
-        # python 2.5 failed with UnicodeEncodeError on set_parent_ids:
         tree.set_parent_ids([revision1])
 
 




More information about the bazaar-commits mailing list