~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-28 07:08:27 UTC
  • mfrom: (2553.1.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070628070827-h5s313dg5tnag9vj
(robertc) Show the names of commit hooks during commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib import (
28
28
    branch as _mod_branch,
29
29
    bzrdir,
30
 
    config,
31
30
    errors,
32
 
    trace,
33
31
    urlutils,
34
32
    )
35
33
from bzrlib.branch import (
283
281
    def test_light_checkout_with_references(self):
284
282
        self.do_checkout_test(lightweight=True)
285
283
 
286
 
    def test_set_push(self):
287
 
        branch = self.make_branch('source', format='dirstate-tags')
288
 
        branch.get_config().set_user_option('push_location', 'old',
289
 
            store=config.STORE_LOCATION)
290
 
        warnings = []
291
 
        def warning(*args):
292
 
            warnings.append(args[0] % args[1:])
293
 
        _warning = trace.warning
294
 
        trace.warning = warning
295
 
        try:
296
 
            branch.set_push_location('new')
297
 
        finally:
298
 
            trace.warning = _warning
299
 
        self.assertEqual(warnings[0], 'Value "new" is masked by "old" from '
300
 
                         'locations.conf')
301
 
 
302
284
class TestBranchReference(TestCaseWithTransport):
303
285
    """Tests for the branch reference facility."""
304
286