125
129
def branch_callback(self, refs):
126
130
self.callbacks.append(('branch', refs))
127
131
return self.branch_check(refs)
134
class TestCleanRepository(TestCaseWithRepository):
136
def test_new_repo(self):
137
repo = self.make_repository('foo')
139
self.addCleanup(repo.unlock)
140
config = _mod_config.Config()
141
os.environ['BZR_EMAIL'] = 'foo@sample.com'
142
builder = repo.get_commit_builder(None, [], config)
143
list(builder.record_iter_changes(None, _mod_revision.NULL_REVISION, [
144
('TREE_ROOT', (None, ''), True, (False, True), (None, None),
145
(None, ''), (None, 'directory'), (None, False))]))
146
builder.finish_inventory()
147
rev_id = builder.commit('first post')
148
result = repo.check(None, check_repo=True)
149
result.report_results(True)
150
log = self._get_log(keep_log_file=True)
151
self.assertFalse('Missing' in log, "Something was missing in %r" % log)