24
24
def test_shelve(self):
25
25
self.runbzr('init')
26
26
self.runbzr('commit -m uc --unchanged')
27
self.runbzr('shelve -r 1 -m foo', retcode=0)
27
self.runbzr('shelve -r 1 -m foo --all', retcode=3)
28
file('foo', 'wb').write('foo')
29
self.runbzr('add foo')
30
self.runbzr('commit -m foo')
31
self.runbzr('shelve -r 1 -m foo --all', retcode=0)
29
33
def test_fetch_ghosts(self):
30
34
self.runbzr('init')
66
70
self.runbzr('branch . my_branch')
67
71
self.runbzr('fetch-ghosts my_branch')
74
self.runbzr('init source')
75
self.runbzr('checkout --lightweight source checkout')
76
self.runbzr('zap checkout')
77
self.assertIs(False, os.path.exists('checkout'))
78
self.assertIs(True, os.path.exists('source'))
80
def test_zap_branch(self):
81
self.runbzr('init source')
82
self.runbzr('checkout --lightweight source checkout')
83
self.runbzr('zap --branch checkout')
84
self.assertIs(False, os.path.exists('checkout'))
85
self.assertIs(False, os.path.exists('source'))
87
def test_branches(self):
88
self.runbzr('init source')
89
self.runbzr('init source/subsource')
90
self.runbzr('checkout --lightweight source checkout')
91
self.runbzr('init checkout/subcheckout')
92
self.runbzr('init checkout/.bzr/subcheckout')
93
out = self.capture('branches')
94
lines = out.split('\n')
95
self.assertIs(True, 'source' in lines)
96
self.assertIs(True, 'source/subsource' in lines)
97
self.assertIs(True, 'checkout/subcheckout' in lines)
98
self.assertIs(True, 'checkout' not in lines)
99
self.assertIs(True, 'checkout/.bzr/subcheckout' not in lines)
70
102
return makeSuite(TestBzrTools)