Rev 5035: Fix imports in per_repository/test_fileid_involved.py. in file:///home/vila/src/bzr/cleanup/test-imports/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Feb 8 09:23:42 GMT 2010
At file:///home/vila/src/bzr/cleanup/test-imports/
------------------------------------------------------------
revno: 5035
revision-id: v.ladeuil+lp at free.fr-20100208092342-bbpu63xic0qiwy1f
parent: v.ladeuil+lp at free.fr-20100208092042-ce6zhdlut1ln3t85
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-imports
timestamp: Mon 2010-02-08 10:23:42 +0100
message:
Fix imports in per_repository/test_fileid_involved.py.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_repository/test_fileid_involved.py'
--- a/bzrlib/tests/per_repository/test_fileid_involved.py 2009-09-09 02:14:12 +0000
+++ b/bzrlib/tests/per_repository/test_fileid_involved.py 2010-02-08 09:23:42 +0000
@@ -14,7 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-import os
import sys
import time
@@ -23,15 +22,12 @@
remote,
revision as _mod_revision,
tests,
+ transform,
)
-from bzrlib.errors import IllegalPath, NonAsciiRevisionId
-from bzrlib.tests import TestSkipped
-from bzrlib.tests.per_repository.test_repository import TestCaseWithRepository
-from bzrlib.transform import TreeTransform
-from bzrlib.workingtree import WorkingTree
-
-
-class FileIdInvolvedBase(TestCaseWithRepository):
+from bzrlib.tests import per_repository
+
+
+class FileIdInvolvedBase(per_repository.TestCaseWithRepository):
def touch(self, tree, filename):
# use the trees transport to not depend on the tree's location or type.
@@ -81,13 +77,13 @@
'c-funky<file-id>quiji%bo'])
try:
main_wt.commit("Commit one", rev_id="rev-A")
- except IllegalPath:
+ except errors.IllegalPath:
# TODO: jam 20060701 Consider raising a different exception
# newer formats do support this, and nothin can done to
# correct this test - its not a bug.
if sys.platform == 'win32':
- raise TestSkipped('Old repository formats do not'
- ' support file ids with <> on win32')
+ raise tests.TestSkipped('Old repository formats do not'
+ ' support file ids with <> on win32')
# This is not a known error condition
raise
@@ -243,9 +239,9 @@
revision_id = u'r\xe9v-a'.encode('utf8')
try:
main_wt.commit('a', rev_id=revision_id)
- except NonAsciiRevisionId:
- raise TestSkipped('non-ascii revision ids not supported by %s'
- % self.repository_format)
+ except errors.NonAsciiRevisionId:
+ raise tests.TestSkipped('non-ascii revision ids not supported by %s'
+ % self.repository_format)
repo = main_wt.branch.repository
repo.lock_read()
@@ -275,13 +271,13 @@
'c-funky<file-id>quiji\'"%bo'])
try:
main_wt.commit("Commit one", rev_id="rev-A")
- except IllegalPath:
+ except errors.IllegalPath:
# TODO: jam 20060701 Consider raising a different exception
# newer formats do support this, and nothin can done to
# correct this test - its not a bug.
if sys.platform == 'win32':
- raise TestSkipped('Old repository formats do not'
- ' support file ids with <> on win32')
+ raise tests.TestSkipped('Old repository formats do not'
+ ' support file ids with <> on win32')
# This is not a known error condition
raise
@@ -320,7 +316,7 @@
self.assertSubset(l2, l1)
-class FileIdInvolvedWGhosts(TestCaseWithRepository):
+class FileIdInvolvedWGhosts(per_repository.TestCaseWithRepository):
def create_branch_with_ghost_text(self):
builder = self.make_branch_builder('ghost')
@@ -352,7 +348,7 @@
if isinstance(repo, remote.RemoteRepository):
# We can't easily disable the checks in a remote repo.
repo.abort_write_group()
- raise TestSkipped(
+ raise tests.TestSkipped(
"repository format does not support storing revisions with "
"missing texts.")
pack_coll = getattr(repo, '_pack_collection', None)
@@ -408,7 +404,7 @@
unmark a file as executable.
"""
file_id = wt.path2id(path)
- tt = TreeTransform(wt)
+ tt = transform.TreeTransform(wt)
try:
tt.set_executability(executable, tt.trans_id_tree_file_id(file_id))
tt.apply()
More information about the bazaar-commits
mailing list