206
208
ctree.note_id("e", "grandparent/alt_parent/fool")
207
209
self.assertEqual(self.sorted_ids(ctree), ['a', 'b', 'd', 'e'])
210
patchesTestSuite = unittest.makeSuite(CTreeTester,'test_')
211
runner = unittest.TextTestRunner()
212
runner.run(patchesTestSuite)
211
class CSetTester(InTempDir):
213
from bzrlib.branch import find_branch
214
from gen_changeset import show_changeset
215
from read_changeset import read_changeset
219
from cStringIO import StringIO
224
self.b1 = find_branch('b1', init=True)
225
self.b2 = find_branch('b2', init=True)
227
open(pjoin('b1/one'), 'wb').write('one\n')
229
self.b1.commit('add one', rev_id='a@cset-0-1')
231
cset_txt = StringIO()
232
show_changeset(self.b1, None, self.b1, 'a@cset-0-1', to_file=cset_txt)
234
self.assertEqual(cset_txt.readline(), '# Bazaar-NG changeset v0.0.5\n')
235
self.assertEqual(cset_txt.readline(), '# \n')
238
# This should also validate the generate changeset
239
info, tree, inv = read_changeset(cset_txt, self.b1)