217
216
b = Branch('../b')
218
217
a.get_revision_xml(b.last_patch())
219
print "Pending: %s" % a.pending_merges()
220
# assert a.pending_merges() == [b.last_patch()], "Assertion %s %s" \
221
# % (a.pending_merges(), b.last_patch())
218
self.log('pending merges: %s', a.pending_merges())
219
# assert a.pending_merges() == [b.last_patch()], "Assertion %s %s" \
220
# % (a.pending_merges(), b.last_patch())
223
"""Pull changes from one branch to another."""
227
self.example_branch()
229
self.runbzr('branch a b')
231
self.runbzr('commit -m blah --unchanged')
235
assert a.revision_history() == b.revision_history()[:-1]
236
self.runbzr('pull ../b')
237
assert a.revision_history() == b.revision_history()
238
self.runbzr('commit -m blah2 --unchanged')
240
self.runbzr('commit -m blah3 --unchanged')
241
self.runbzr('pull ../a', retcode=1)
243
self.runbzr('merge ../b')
244
self.runbzr('commit -m blah4 --unchanged')
246
self.runbzr('pull ../a')
247
assert a.revision_history()[-1] == b.revision_history()[-1]
250
def test_add_reports(self):
251
"""add command prints the names of added files."""
252
b = Branch('.', init=True)
253
self.build_tree(['top.txt', 'dir/', 'dir/sub.txt'])
255
from cStringIO import StringIO
258
ret = self.apply_redirected(None, out, None,
261
self.assertEquals(ret, 0)
263
# the ordering is not defined at the moment
264
results = sorted(out.getvalue().rstrip('\n').split('\n'))
265
self.assertEquals(['added dir',
223
271
class OldTests(ExternalBase):
224
272
"""old tests moved from ./testbzr."""