~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_remove.py

  • Committer: Jelmer Vernooij
  • Date: 2010-12-20 11:57:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5577.
  • Revision ID: jelmer@samba.org-20101220115714-2ru3hfappjweeg7q
Don't use no-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import os
19
19
import sys
20
20
 
21
 
from bzrlib.tests import SymlinkFeature, TestSkipped
22
 
from bzrlib.tests import TestCaseWithTransport
 
21
from bzrlib.tests import (
 
22
    script,
 
23
    SymlinkFeature,
 
24
    TestCaseWithTransport,
 
25
    TestSkipped,
 
26
    )
23
27
from bzrlib.workingtree import WorkingTree
24
28
from bzrlib import osutils
25
29
 
200
204
        self.run_bzr('remove --keep a', error_regexes=["a is not versioned."])
201
205
        self.assertFilesUnversioned(files)
202
206
 
 
207
    def test_remove_no_backup_unversioned_files(self):
 
208
        self.build_tree(files)
 
209
        tree = self.make_branch_and_tree('.')
 
210
        script.ScriptRunner().run_script(self, '''
 
211
        $ bzr remove --no-backup a b/ b/c d/
 
212
        2>deleted d
 
213
        2>removed b/c (but kept a copy: b/c.~1~)
 
214
        2>deleted b
 
215
        2>deleted a
 
216
        ''')
 
217
        self.assertFilesDeleted(files)
 
218
 
203
219
    def test_remove_force_unversioned_files(self):
204
220
        self.build_tree(files)
205
221
        tree = self.make_branch_and_tree('.')
206
 
        self.run_bzr(['remove', '--force'] + list(files),
207
 
                     error_regexes=["deleted a", "deleted b",
208
 
                                    "removed b/c", "deleted d"])
 
222
        script.ScriptRunner().run_script(self, '''
 
223
        $ bzr remove --force a b/ b/c d/
 
224
        2>(The --force option is deprecated, rather use --no-backup in future.)
 
225
        2>deleted d
 
226
        2>removed b/c (but kept a copy: b/c.~1~)
 
227
        2>deleted b
 
228
        2>deleted a
 
229
        ''')
209
230
        self.assertFilesDeleted(files)
210
231
 
211
232
    def test_remove_deleted_files(self):