/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-02 20:46:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060502204611-02caa5c20fb84ef8
Moved url functions into bzrlib.urlutils

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
from bzrlib.revision import common_ancestor
57
57
import bzrlib.store
58
58
import bzrlib.trace
59
 
from bzrlib.transport import urlescape, get_transport
 
59
from bzrlib.transport import get_transport
60
60
import bzrlib.transport
61
61
from bzrlib.transport.local import LocalRelpathServer
62
62
from bzrlib.transport.readonly import ReadonlyServer
63
63
from bzrlib.trace import mutter
64
64
from bzrlib.tests.TestUtil import TestLoader, TestSuite
65
65
from bzrlib.tests.treeshape import build_tree_contents
 
66
import bzrlib.urlutils as urlutils
66
67
from bzrlib.workingtree import WorkingTree, WorkingTreeFormat2
67
68
 
68
69
default_transport = LocalRelpathServer
714
715
        for name in shape:
715
716
            self.assert_(isinstance(name, basestring))
716
717
            if name[-1] == '/':
717
 
                transport.mkdir(urlescape(name[:-1]))
 
718
                transport.mkdir(urlutils.escape(name[:-1]))
718
719
            else:
719
720
                if line_endings == 'binary':
720
721
                    end = '\n'
723
724
                else:
724
725
                    raise errors.BzrError('Invalid line ending request %r' % (line_endings,))
725
726
                content = "contents of %s%s" % (name.encode('utf-8'), end)
726
 
                transport.put(urlescape(name), StringIO(content))
 
727
                transport.put(urlutils.escape(name), StringIO(content))
727
728
 
728
729
    def build_tree_contents(self, shape):
729
730
        build_tree_contents(shape)
821
822
        if relpath is not None and relpath != '.':
822
823
            if not base.endswith('/'):
823
824
                base = base + '/'
824
 
            base = base + urlescape(relpath)
 
825
            base = base + urlutils.escape(relpath)
825
826
        return base
826
827
 
827
828
    def get_transport(self):
1052
1053
                   'bzrlib.tests.test_tuned_gzip',
1053
1054
                   'bzrlib.tests.test_ui',
1054
1055
                   'bzrlib.tests.test_upgrade',
 
1056
                   'bzrlib.tests.test_urlutils',
1055
1057
                   'bzrlib.tests.test_versionedfile',
1056
1058
                   'bzrlib.tests.test_weave',
1057
1059
                   'bzrlib.tests.test_whitebox',