~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-06 04:32:17 UTC
  • mfrom: (1551.16.3 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070606043217-jlt8hu49sk54tsag
Don't crash on merging renames of deleted files (#110279)

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
        registry.remove('merge4')
250
250
        self.assertFalse('merge4' in [x[0] for x in 
251
251
                        merge_type_option.iter_switches()])
 
252
 
 
253
    def test_merge_other_moves_we_deleted(self):
 
254
        tree_a = self.make_branch_and_tree('A')
 
255
        tree_a.lock_write()
 
256
        self.addCleanup(tree_a.unlock)
 
257
        self.build_tree(['A/a'])
 
258
        tree_a.add('a')
 
259
        tree_a.commit('1', rev_id='rev-1')
 
260
        tree_a.flush()
 
261
        tree_a.rename_one('a', 'b')
 
262
        tree_a.commit('2')
 
263
        bzrdir_b = tree_a.bzrdir.sprout('B', revision_id='rev-1')
 
264
        tree_b = bzrdir_b.open_workingtree()
 
265
        tree_b.lock_write()
 
266
        self.addCleanup(tree_b.unlock)
 
267
        os.unlink('B/a')
 
268
        tree_b.commit('3')
 
269
        try:
 
270
            tree_b.merge_from_branch(tree_a.branch)
 
271
        except AttributeError:
 
272
            self.fail('tried to join a path when name was None')