/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/workingtree_implementations/test_commit.py

  • Committer: Robert Collins
  • Date: 2007-04-23 02:29:35 UTC
  • mfrom: (2441 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2442.
  • Revision ID: robertc@robertcollins.net-20070423022935-9hhongamvk6bfdso
Resolve conflicts with bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
                          tree.commit,
102
102
                          'foo',
103
103
                          local=True)
104
 
 
 
104
 
 
105
    def test_commit_merged_kind_change(self):
 
106
        """Test merging a kind change.
 
107
 
 
108
        Test making a kind change in a working tree, and then merging that
 
109
        from another. When committed it should commit the new kind.
 
110
        """
 
111
        wt = self.make_branch_and_tree('.')
 
112
        self.build_tree(['a'])
 
113
        wt.add(['a'])
 
114
        wt.commit('commit one')
 
115
        wt2 = wt.bzrdir.sprout('to').open_workingtree()
 
116
        os.remove('a')
 
117
        os.mkdir('a')
 
118
        wt.commit('changed kind')
 
119
        wt2.merge_from_branch(wt.branch)
 
120
        wt2.commit('merged kind change')
 
121
 
105
122
    def test_local_commit_ignores_master(self):
106
123
        # a --local commit does not require access to the master branch
107
124
        # at all, or even for it to exist.
199
216
        self.assertFalse(wt.has_filename('d'))
200
217
        wt.unlock()
201
218
 
 
219
    def test_commit_deleted_subtree_with_removed(self):
 
220
        wt = self.make_branch_and_tree('.')
 
221
        self.build_tree(['a', 'b/', 'b/c', 'd'])
 
222
        wt.add(['a', 'b', 'b/c'], ['a-id', 'b-id', 'c-id'])
 
223
        wt.commit('first')
 
224
        wt.remove('b/c')
 
225
        this_dir = self.get_transport()
 
226
        this_dir.delete_tree('b')
 
227
        wt.lock_write()
 
228
        wt.commit('commit deleted rename')
 
229
        self.assertTrue(wt.has_id('a-id'))
 
230
        self.assertFalse(wt.has_or_had_id('b-id'))
 
231
        self.assertFalse(wt.has_or_had_id('c-id'))
 
232
        self.assertTrue(wt.has_filename('a'))
 
233
        self.assertFalse(wt.has_filename('b'))
 
234
        self.assertFalse(wt.has_filename('b/c'))
 
235
        wt.unlock()
 
236
 
202
237
    def test_commit_move_new(self):
203
238
        wt = self.make_branch_and_tree('first')
204
239
        wt.commit('first')