13
13
def touch(filename):
14
14
file(filename, 'wb').write('')
16
def test_clean_tree(self):
18
self.run_bzr('ignore *~')
19
self.run_bzr('ignore *.pyc')
22
assert os.path.lexists('name~')
23
self.touch('name.pyc')
24
self.run_bzr('clean-tree --force')
25
assert os.path.lexists('name~')
26
assert not os.path.lexists('name')
28
self.run_bzr('clean-tree --detritus --force')
29
assert os.path.lexists('name')
30
assert not os.path.lexists('name~')
31
assert os.path.lexists('name.pyc')
32
self.run_bzr('clean-tree --ignored --force')
33
assert os.path.lexists('name')
34
assert not os.path.lexists('name.pyc')
35
self.run_bzr('clean-tree --unknown --force')
36
assert not os.path.lexists('name')
39
self.touch('name.pyc')
40
self.run_bzr('clean-tree --unknown --ignored --force')
41
assert not os.path.lexists('name')
42
assert not os.path.lexists('name~')
43
assert not os.path.lexists('name.pyc')
45
16
def test_shelve(self):
46
17
self.run_bzr('init')
47
18
self.run_bzr('commit -m uc --unchanged')
48
self.run_bzr('shelve -r 1 -m foo --all', retcode=3)
19
self.run_bzr('shelve1 -r 1 -m foo --all', retcode=3)
49
20
file('foo', 'wb').write('foo')
50
21
self.run_bzr('add foo')
51
22
self.run_bzr('commit -m foo')
52
self.run_bzr('shelve -r 1 -m foo --all', retcode=0)
23
self.run_bzr('shelve1 -r 1 -m foo --all', retcode=0)
54
25
def test_fetch_ghosts(self):
55
26
self.run_bzr('init')