93
92
def test_ignore_patterns(self):
94
93
from bzrlib.branch import Branch
96
b = Branch('.', init=True)
95
b = Branch.initialize('.')
97
96
self.assertEquals(list(b.unknowns()), [])
99
98
file('foo.tmp', 'wt').write('tmp files are ignored')
147
147
os.rmdir('revertdir')
148
148
self.runbzr('revert')
150
def test_mv_modes(self):
150
def skipped_test_mv_modes(self):
151
151
"""Test two modes of operation for mv"""
152
152
from bzrlib.branch import Branch
153
b = Branch('.', init=True)
153
b = Branch.initialize('.')
154
154
self.build_tree(['a', 'c', 'subdir/'])
155
self.run_bzr('add', self.test_dir)
156
155
self.run_bzr('mv', 'a', 'b')
157
156
self.run_bzr('mv', 'b', 'subdir')
158
157
self.run_bzr('mv', 'subdir/b', 'a')
159
self.run_bzr('mv', 'a', 'c', 'subdir')
158
self.run_bzr('mv', 'a', 'b', 'subdir')
160
159
self.run_bzr('mv', 'subdir/a', 'subdir/newa')
163
161
def test_main_version(self):
164
162
"""Check output from version command and master option is reasonable"""
165
163
# output is intentionally passed through to stdout so that we
214
214
self.runbzr('merge ../b')
215
215
self.check_file_contents('goodbye', 'quux')
216
216
# Merging a branch pulls its revision into the tree
218
b = Branch.open('../b')
219
219
a.get_revision_xml(b.last_patch())
220
221
self.log('pending merges: %s', a.pending_merges())
221
222
# assert a.pending_merges() == [b.last_patch()], "Assertion %s %s" \
222
223
# % (a.pending_merges(), b.last_patch())
225
"""Pull changes from one branch to another."""
229
self.example_branch()
230
self.runbzr('pull', retcode=1)
231
self.runbzr('missing', retcode=1)
232
self.runbzr('missing .')
233
self.runbzr('missing')
235
self.runbzr('pull /', retcode=1)
239
self.runbzr('branch a b')
242
self.runbzr('commit -m blah --unchanged')
246
assert a.revision_history() == b.revision_history()[:-1]
247
self.runbzr('pull ../b')
248
assert a.revision_history() == b.revision_history()
249
self.runbzr('commit -m blah2 --unchanged')
251
self.runbzr('commit -m blah3 --unchanged')
252
self.runbzr('pull ../a', retcode=1)
254
self.runbzr('merge ../b')
255
self.runbzr('commit -m blah4 --unchanged')
257
self.runbzr('pull ../a')
258
assert a.revision_history()[-1] == b.revision_history()[-1]
261
226
def test_add_reports(self):
262
227
"""add command prints the names of added files."""
263
b = Branch('.', init=True)
228
b = Branch.initialize('.')
264
229
self.build_tree(['top.txt', 'dir/', 'dir/sub.txt'])
266
231
from cStringIO import StringIO