/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: Robert Collins
  • Date: 2010-05-06 23:41:35 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506234135-yivbzczw1sejxnxc
Lock methods on ``Tree``, ``Branch`` and ``Repository`` are now
expected to return an object which can be used to unlock them. This reduces
duplicate code when using cleanups. The previous 'tokens's returned by
``Branch.lock_write`` and ``Repository.lock_write`` are now attributes
on the result of the lock_write. ``repository.RepositoryWriteLockResult``
and ``branch.BranchWriteLockResult`` document this. (Robert Collins)

``log._get_info_for_log_files`` now takes an add_cleanup callable.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
from bzrlib.tests import (
113
113
    test_server,
114
114
    TestUtil,
115
 
    treeshape,
116
115
    )
117
116
from bzrlib.tests.http_server import HttpServer
118
117
from bzrlib.tests.TestUtil import (
119
118
                          TestSuite,
120
119
                          TestLoader,
121
120
                          )
 
121
from bzrlib.tests.treeshape import build_tree_contents
122
122
from bzrlib.ui import NullProgressView
123
123
from bzrlib.ui.text import TextUIFactory
124
124
import bzrlib.version_info_formats.format_custom
1524
1524
            'EDITOR': None,
1525
1525
            'BZR_EMAIL': None,
1526
1526
            'BZREMAIL': None, # may still be present in the environment
1527
 
            'EMAIL': 'jrandom@example.com', # set EMAIL as bzr does not guess
 
1527
            'EMAIL': None,
1528
1528
            'BZR_PROGRESS_BAR': None,
1529
1529
            'BZR_LOG': None,
1530
1530
            'BZR_PLUGIN_PATH': None,
2578
2578
                content = "contents of %s%s" % (name.encode('utf-8'), end)
2579
2579
                transport.put_bytes_non_atomic(urlutils.escape(name), content)
2580
2580
 
2581
 
    build_tree_contents = staticmethod(treeshape.build_tree_contents)
 
2581
    def build_tree_contents(self, shape):
 
2582
        build_tree_contents(shape)
2582
2583
 
2583
2584
    def assertInWorkingTree(self, path, root_path='.', tree=None):
2584
2585
        """Assert whether path or paths are in the WorkingTree"""