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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
    def test_add_dry_run(self):
122
122
        """Test a dry run add, make sure nothing is added."""
123
123
        from bzrlib.commands import run_bzr
124
 
        ignores._set_user_ignores(['./.bazaar'])
125
124
        eq = self.assertEqual
126
125
        wt = self.make_branch_and_tree('.')
127
126
        self.build_tree(['inertiatic/', 'inertiatic/esp'])
140
139
        from bzrlib.commands import run_bzr
141
140
        wt = self.make_branch_and_tree('.')
142
141
        # The default ignore list includes '*.py[co]', but not CVS
143
 
        ignores._set_user_ignores(['./.bazaar', '*.py[co]'])
 
142
        ignores._set_user_ignores(['*.py[co]'])
144
143
        self.build_tree(['inertiatic/', 'inertiatic/esp', 'inertiatic/CVS',
145
144
                        'inertiatic/foo.pyc'])
146
145
        added, ignored = smart_add_tree(wt, u'.')
320
319
 
321
320
        self.build_tree(['new/a', 'new/b', 'new/c',
322
321
                         'new/subdir/', 'new/subdir/b', 'new/subdir/d'])
 
322
        new_tree.set_root_id(self.base_tree.get_root_id())
323
323
        self.add_helper(self.base_tree, 'dir', new_tree, ['new'])
324
324
 
325
 
        # We 'a' and 'b' exist in the root, and they are being added
326
 
        # in a new 'root'. Since ROOT ids are not unique, we will
 
325
        # We know 'a' and 'b' exist in the root, and they are being added
 
326
        # in a new 'root'. Since ROOT ids have been set as the same, we will
327
327
        # use those ids
328
 
        # TODO: This will probably change once trees have a unique root id
329
 
        # It is definitely arguable that 'a' should get the id of
330
 
        # 'dir/a' not of 'a'.
331
328
        self.assertEqual(self.base_tree.path2id('a'),
332
329
                         new_tree.path2id('a'))
333
330
        self.assertEqual(self.base_tree.path2id('b'),