~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tests/test_prepare_shelf.py

  • Committer: Aaron Bentley
  • Date: 2008-10-06 20:37:20 UTC
  • mto: (0.15.1 unshelve)
  • mto: This revision was merged to the branch mainline in revision 3820.
  • Revision ID: aaron@aaronbentley.com-20081006203720-fpbhgl4o5hcn82y6
Somewhat clean up shelving

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        self.assertEqual([('add file', 'bar-id', 'directory'),
95
95
                          ('add file', 'foo-id', 'file')],
96
96
                          sorted(list(creator)))
97
 
        creator.shelve_creation('foo-id', 'file')
98
 
        creator.shelve_creation('bar-id', 'directory')
 
97
        creator.shelve_creation('foo-id')
 
98
        creator.shelve_creation('bar-id')
99
99
        creator.transform()
100
100
        self.assertRaises(StopIteration,
101
101
                          tree.iter_entries_by_dir(['foo-id']).next)
120
120
        creator = prepare_shelf.ShelfCreator(tree, tree.basis_tree())
121
121
        self.addCleanup(creator.finalize)
122
122
        self.assertEqual([('add file', 'foo-id', 'symlink')], list(creator))
123
 
        creator.shelve_creation('foo-id', 'symlink')
 
123
        creator.shelve_creation('foo-id')
124
124
        creator.transform()
125
125
        s_trans_id = creator.shelf_transform.trans_id_file_id('foo-id')
126
126
        self.failIfExists('foo')
133
133
        tree.add('foo', 'foo-id')
134
134
        creator = prepare_shelf.ShelfCreator(tree, tree.basis_tree())
135
135
        list(creator)
136
 
        creator.shelve_creation('foo-id', 'file')
 
136
        creator.shelve_creation('foo-id')
137
137
        filename = creator.write_shelf()
138
138
        self.assertContainsRe(filename, 'tree/.shelf2/01$')
139
139
        self.failUnlessExists(filename)