/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/test_switch.py

  • Committer: Jelmer Vernooij
  • Date: 2010-03-13 02:49:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5089.
  • Revision ID: jelmer@samba.org-20100313024914-rpuoguinoxpxt05b
Allow merge directives to output multiple patch files. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import os
21
21
 
22
 
from bzrlib import (
23
 
    branch,
24
 
    errors,
25
 
    merge as _mod_merge,
26
 
    switch,
27
 
    tests,
28
 
)
 
22
from bzrlib import branch, errors, switch, tests
29
23
 
30
24
 
31
25
class TestSwitch(tests.TestCaseWithTransport):
135
129
        switch.switch(checkout.bzrdir, tree2.branch)
136
130
        self.assertEqual('custom-root-id', tree2.get_root_id())
137
131
 
138
 
    def test_switch_configurable_file_merger(self):
139
 
        class DummyMerger(_mod_merge.ConfigurableFileMerger):
140
 
            name_prefix = 'file'
141
 
 
142
 
        _mod_merge.Merger.hooks.install_named_hook(
143
 
            'merge_file_content', DummyMerger,
144
 
            'test factory')
145
 
        foo = self.make_branch('foo')
146
 
        checkout = foo.create_checkout('checkout', lightweight=True)
147
 
        self.build_tree_contents([('checkout/file', 'a')])
148
 
        checkout.add('file')
149
 
        checkout.commit('a')
150
 
        bar = foo.bzrdir.sprout('bar').open_workingtree()
151
 
        self.build_tree_contents([('bar/file', 'b')])
152
 
        bar.commit('b')
153
 
        self.build_tree_contents([('checkout/file', 'c')])
154
 
        switch.switch(checkout.bzrdir, bar.branch)
155
 
 
156
132
 
157
133
class TestSwitchHeavyweight(TestSwitch):
158
134