/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_add.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:
158
158
        # the root should have been changed to be a new unique root.
159
159
        self.assertNotEqual(inventory.ROOT_ID, tree.path2id(''))
160
160
        tree.unlock()
 
161
 
 
162
    def test_add_previously_added(self):
 
163
        # adding a path that was previously added should work
 
164
        tree = self.make_branch_and_tree('.')
 
165
        self.build_tree(['foo'])
 
166
        tree.add(['foo'], ['foo-id'])
 
167
        tree.unversion(['foo-id'])
 
168
        tree.add(['foo'], ['foo-id'])
 
169
        self.assertEqual('foo-id', tree.path2id('foo'))
 
170
 
 
171
    def test_add_present_in_basis(self):
 
172
        # adding a path that was present in the basis should work.
 
173
        tree = self.make_branch_and_tree('.')
 
174
        self.build_tree(['foo'])
 
175
        tree.add(['foo'], ['foo-id'])
 
176
        tree.commit('add foo')
 
177
        tree.unversion(['foo-id'])
 
178
        tree.add(['foo'], ['foo-id'])
 
179
        self.assertEqual('foo-id', tree.path2id('foo'))