Rev 5031: Fix imports in per_branch/test_uncommit.py. in file:///home/vila/src/bzr/cleanup/test-imports/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Feb 8 09:08:31 GMT 2010


At file:///home/vila/src/bzr/cleanup/test-imports/

------------------------------------------------------------
revno: 5031
revision-id: v.ladeuil+lp at free.fr-20100208090831-gsyiciii1dfxtocf
parent: v.ladeuil+lp at free.fr-20100208090543-r1k3nbnwfmhqjm6q
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-imports
timestamp: Mon 2010-02-08 10:08:31 +0100
message:
  Fix imports in per_branch/test_uncommit.py.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_branch/test_uncommit.py'
--- a/bzrlib/tests/per_branch/test_uncommit.py	2009-07-10 05:49:34 +0000
+++ b/bzrlib/tests/per_branch/test_uncommit.py	2010-02-08 09:08:31 +0000
@@ -19,17 +19,19 @@
 Note that uncommit currently is not a branch method; it should be.
 """
 
-from bzrlib.branch import Branch
-from bzrlib import errors
-from bzrlib.tests.per_branch.test_branch import TestCaseWithBranch
-from bzrlib.uncommit import uncommit
-
-
-class TestUncommitHook(TestCaseWithBranch):
+from bzrlib import (
+    branch,
+    errors,
+    uncommit,
+    )
+from bzrlib.tests import per_branch
+
+
+class TestUncommitHook(per_branch.TestCaseWithBranch):
 
     def setUp(self):
         self.hook_calls = []
-        TestCaseWithBranch.setUp(self)
+        super(TestUncommitHook, self).setUp()
 
     def capture_post_uncommit_hook(self, local, master, old_revno,
         old_revid, new_revno, new_revid):
@@ -53,9 +55,9 @@
         tree.add('')
         revid = tree.commit('a revision')
         tree.unlock()
-        Branch.hooks.install_named_hook('post_uncommit',
+        branch.Branch.hooks.install_named_hook('post_uncommit',
             self.capture_post_uncommit_hook, None)
-        uncommit(tree.branch)
+        uncommit.uncommit(tree.branch)
         # with nothing left we should still get a notification, and
         # have the branch locked at notification time.
         self.assertEqual([
@@ -76,9 +78,9 @@
         tree.add('')
         revid = tree.commit('a revision')
         tree.unlock()
-        Branch.hooks.install_named_hook('post_uncommit',
-            self.capture_post_uncommit_hook, None)
-        uncommit(tree.branch)
+        branch.Branch.hooks.install_named_hook(
+            'post_uncommit', self.capture_post_uncommit_hook, None)
+        uncommit.uncommit(tree.branch)
         # with nothing left we should still get a notification, and
         # have the branch locked at notification time.
         self.assertEqual([
@@ -95,9 +97,9 @@
         revid2 = tree.commit('second revision')
         revid3 = tree.commit('third revision')
         tree.unlock()
-        Branch.hooks.install_named_hook('post_uncommit',
-            self.capture_post_uncommit_hook, None)
-        uncommit(tree.branch, revno=2)
+        branch.Branch.hooks.install_named_hook(
+            'post_uncommit', self.capture_post_uncommit_hook, None)
+        uncommit.uncommit(tree.branch, revno=2)
         # having uncommitted from up the branch, we should get the
         # before and after revnos and revids correctly.
         self.assertEqual([



More information about the bazaar-commits mailing list